Documentation create s.campaign on Launch | Community
Skip to main content
Level 3
May 18, 2021
Solved

Documentation create s.campaign on Launch

  • May 18, 2021
  • 3 replies
  • 2874 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

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.

3 replies

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
May 18, 2021

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.

Level 3
May 18, 2021

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

khurshid
Adobe Employee
Adobe Employee
May 18, 2021

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); 

Urs_Boller
Community Advisor
Community Advisor
May 19, 2021

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");

jantzen_b
Adobe Employee
Adobe Employee
July 20, 2021
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?