How to set a Tracking Code (s.campaign?) for an SEO visit
Trying to set a tracking code for guest when then come to our site from an SEO link. Because SEO links do not contain tracking codes in the URL I am not sure how to set this.
Any thoughts?
Trying to set a tracking code for guest when then come to our site from an SEO link. Because SEO links do not contain tracking codes in the URL I am not sure how to set this.
Any thoughts?
You should be able to create code based on Referrer.. I assume you are using Adobe Launch (or whatever they call it now), and are using a Data Element with custom code?
Something like this should work (just the referrer part, I assume you already have code to detect and parse your campaign data already):
var referrer = _satellite.getVar('data-element-referrer');
// Where data-element-referrer is the name of your data element that gets the page's referrer value
OR
var referrer = window.document.referrer;
// If you want to just read the referrer directly with JS
customSEOCampaign = "";
if (referrer.indexOf('https://www.google.') > -1){
customSEOCampaign = "SEO";
}
return customSEOCampaign;
Then use this Data Element in your custom eVar (or use custom code to set your s.campaign value based on presence of Campaign Tracking Codes or Referrer.
The other option is to use Processing Rules, or just create a Segment in your workspace.... There are many ways to go about this 🙂
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.