s.campaign Value Not Receiving Credit for Success Events | Community
Skip to main content
haddnin
Level 2
April 26, 2018
Solved

s.campaign Value Not Receiving Credit for Success Events

  • April 26, 2018
  • 13 replies
  • 8075 views

I'm setting s.campaign in DTM (AppMeasurement) in a page load rule and have a couple of events that fire when a user starts/completes an online application. According to this article (https://marketing.adobe.com/resources/help/en_US/sc/implement/campaign.html), "Each campaign value remains active for a user, and receives credit for that user's activities and success events until it expires."

In my implementation, the s_campaign cookie set by s.getValOnce() is present when the events fire, but the Campaign Tracking Code report is not showing the events metrics giving credit to the campaign variable.

Here's my Custom Page Code in Page Load Rule:

/*

* Plugin: getValOnce_v1.11

*/

s.getValOnce=new Function("v","c","e","t",""

+"var s=this,a=new Date,v=v?v:'',c=c?c:'s_gvo',e=e?e:0,i=t=='m'?6000"

+"0:86400000,k=s.c_r(c);if(v){a.setTime(a.getTime()+e*i);s.c_w(c,v,e"

+"==0?0:a);}return v==k?'':v");

/* External Campaign Tracking */

if (s.Util.getQueryParam('cid')) {

  s.campaign = s.Util.getQueryParam('cid');

  s.campaign = s.getValOnce(s.campaign,'s_campaign',0);

}

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 Waqas_Rafiq

Is the company going to continue using metrics.mydomain.com and smetrics.mydomain.com? If yes, then I would recommend to change your appmeasurement code to the following:

s_account = "reportsuiteid" //assuming these are the same across both codes

s.visitorNamespace = "" //should be the same for both codes

s.trackingServer = "metrics.yourdomain.com" //should be the same for both codes

s.trackingServerSecure = "smetrics.domain.com" //should be the same for both codes

If you have different values, you will have new visitors being registered and hence your s.campaign is not being set.

13 replies

Waqas_Rafiq
Level 4
April 27, 2018

That means the code is working as it should. If you click start application and the event fires, that should be associated with that specific campaign now, without you having to set s.campaign again.

And that's not the case at the moment?

haddnin
haddninAuthor
Level 2
April 27, 2018

This is not the case at the moment. After your suggestion of monitoring the network traffic, I think I know what's going on now.

Just a bit of history: We are phasing in the implementation to AppMeasurement (DTM) from Omniture s_code H.26. The products website is using the new AppMeasurement code while the start application event implementation is still using the H.26 code. AppMeasurement request url is going to 112.2o7.net while the start application event is going to smetrics.mydomain.com. So, while s.campaign (v0) is being sent to a different url than start application events, then the event will never give credit to s.campaign? Is this a correct assumption?

How can I get both implementations to go to the same reporting request url?

Waqas_Rafiq
Waqas_RafiqAccepted solution
Level 4
April 27, 2018

Is the company going to continue using metrics.mydomain.com and smetrics.mydomain.com? If yes, then I would recommend to change your appmeasurement code to the following:

s_account = "reportsuiteid" //assuming these are the same across both codes

s.visitorNamespace = "" //should be the same for both codes

s.trackingServer = "metrics.yourdomain.com" //should be the same for both codes

s.trackingServerSecure = "smetrics.domain.com" //should be the same for both codes

If you have different values, you will have new visitors being registered and hence your s.campaign is not being set.