我希望能够手动设置 UTM 变量
因此,与其拥有一个网页
http://mysite.net/index.html?utm_source=source&utm_medium=inbound&utm_campaign=campname
我希望能够用 javascript 设置这些。浏览文档我找不到这些的任何设置方法,只有设置键方法。
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCampaigns
我也试过
_gaq.push(['_trackPageview', '/index.html?utm_source=source&utm_medium=inbound&utm_campaign=campname']);
尽管据我所知这是行不通的。我现在可以看到让它工作的唯一方法是使用哈希值设置它们:
即: http: //mysite.net/index.html#utm_source=In+House&utm_medium=email&utm_campaign=Fall+email+offers
_gaq.push(['_setAllowAnchor', true]);
有没有更好的办法?