Online marketing
fromSearch Engine Roundtable
3 weeks agoGoogle Advice On Setting Canonical URL With JavaScript
Set canonical URLs in HTML whenever possible; if using JavaScript, ensure the canonical matches the original HTML or omit it from HTML and set via JavaScript.