Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Documentation create s.campaign on Launch

francescop47742
Level 3
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
yuhuisg
Correct answer by
Community Advisor
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
yuhuisg
Correct answer by
Community Advisor
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

francescop47742
Level 3
Level 3

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

Khurshid_Alam
Employee
Employee

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

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_belliston-Adobe
Level 10
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?