Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Documentation create s.campaign on Launch

Avatar

Level 3

Hi to all,

 

I'm starting a new Setup for Adobe Analytics and found a guide to setup the S.Campaign.

 

This guide explains how to create the S.Campaign on a landing with parameters cid (or other paramaters); what I don't understand is how to do if the user comes from Google (or another search engine) or from the referral traffic or from direct traffic.

 

Is there an official guide that explains how to populate the S.Campaign in these scenarios? I need to creare s.campaign using document.referrer?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You don't need to set s.campaign with non-campaign sources. So you don't need it for natural search, 3rd party referrers nor direct traffic.

You only need to set it with your campaigns, where you have an explicit campaign tracking code in your landing page URL.

E.g. www.website.com/landing-page?cmp=abc123. In this example, you will set s.campaign to the value of the "cmp" query.

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

You don't need to set s.campaign with non-campaign sources. So you don't need it for natural search, 3rd party referrers nor direct traffic.

You only need to set it with your campaigns, where you have an explicit campaign tracking code in your landing page URL.

E.g. www.website.com/landing-page?cmp=abc123. In this example, you will set s.campaign to the value of the "cmp" query.

Avatar

Level 3

thk for reply, and how Adobe recognize natural search? referral or direct?

Avatar

Employee Advisor

Use the plugin here: getQueryParam | Adobe Analytics

 

You would need to install the plugin in your Analytics setup. You can then set campaign from query param in document.referrer by using this code:
s.campaign=s.getQueryParam('cid','',document.referrer); 

Avatar

Community Advisor

you don't need the plugin nor do you need the "document.referrer" (which is not the actual URL). Assuming the campaign parameter is in the current URL, just create a data element "cmp parameter" by using "core" => "query string parameter" (enter desired parameter). then you are able to set the campaign parameter in the tracking call like this:

s.campaign = _satellite.getVar("cmp parameter");

Avatar

Level 10
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?