Expand my Community achievements bar.

SOLVED

Tracking code

Avatar

Level 3

Will Omniture be able capture tracking code if the url has 2 ampersands? thx

1 Accepted Solution

Avatar

Correct answer by
Level 6

Adobe Analytics won't capture any campaign tracking code until you have configured the Util.getQueryParam. The configuration involves letting Adobe Analytics know what parameter to look for in the URL (e.g. "cid"), referred to as the "key". If there are multiple query parameters in the URL separated by ampersands, Adobe is only going to grab the values associated with the query parameter that you've told it to look for.

For example, let's say that you've configured Util.getQueryParam to look for "cid", and to store the value associated with the "cid" key in the s.campaign variable (s.eVar0). if the URL for one of your campaigns is mysite.com/?cid=new_campaign&eid=other_campaign, only the value associated with the cid parameter, new_campaign, will be captured.

For another example, let's say that the campaign URL is mysite.com/?cid=new&campaign. The presence of the ampersand tells Adobe to stop because the ampersand is Adobe's default delimiter. In this case, the value captured in the s.campaign variable is "new", and the "campaign" part is not captured. You can specify a different delimiter, such as semi-colon, in the Util.getQueryParam configuration.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 6

Adobe Analytics won't capture any campaign tracking code until you have configured the Util.getQueryParam. The configuration involves letting Adobe Analytics know what parameter to look for in the URL (e.g. "cid"), referred to as the "key". If there are multiple query parameters in the URL separated by ampersands, Adobe is only going to grab the values associated with the query parameter that you've told it to look for.

For example, let's say that you've configured Util.getQueryParam to look for "cid", and to store the value associated with the "cid" key in the s.campaign variable (s.eVar0). if the URL for one of your campaigns is mysite.com/?cid=new_campaign&eid=other_campaign, only the value associated with the cid parameter, new_campaign, will be captured.

For another example, let's say that the campaign URL is mysite.com/?cid=new&campaign. The presence of the ampersand tells Adobe to stop because the ampersand is Adobe's default delimiter. In this case, the value captured in the s.campaign variable is "new", and the "campaign" part is not captured. You can specify a different delimiter, such as semi-colon, in the Util.getQueryParam configuration.

Avatar

Employee Advisor

ampersands are how query strings are separated. If you have the URL https://example.com?cid=value1&did=value2, you could use the query string param utility to extract either value1 from cid or value2 from did.

Avatar

Level 1

If I understand you correctly, you are trying to capture two tracking codes at the same time for the campaign upon a click?

If so, and if "cid=" was how you configured your getParam value in your s.code.js file, then you could use this syntax:

www.mysite.com?cid=CampaignCode1&cid=CampaignCodeB&cid=CampaignCodeYellow

The result is that all three tracking codes would come in simultaneously upon user click and your Tracking Code report would look like this:

Tracking Code           Click-throughs

1. CampaignCode1           1

2. CampaignCodeB           1

3.CampaignCodeYellow    1