Tracking new elements in the source code | Community
Skip to main content
December 29, 2017
Solved

Tracking new elements in the source code

  • December 29, 2017
  • 17 replies
  • 13117 views

Hi.  We added some new elements on the source code.  See below:

var dtmAnalyticsData = {"channel":"REVIEWS","url":"\/2017\/12\/delta-one-lax-jfk-flight-review\/","pageName":"delta-one-lax-jfk-flight-review","author":"Daryl Chua","eVar20":"business class, Delta, Delta Air Lines, Flight Review, Flight Reviews","eVar21":"12252017","eVar22":0,"eVar23":1413,"eVar24":"","eVar25":"Delta, Delta SkyMiles"};

I added data elements and set up page load tracking for the items listed as evar 21, evar 22, evar 23, evar 24, evar 25.  However, I'm not seeing them in the adobe analytics reporting interface.  Please help.

-Robert

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 jdonley

Okay so a couple of things I see.

First, here is what I see on the page for dtmAnalyticsData:

And here are the Data Elements I see:

So firstly, you originally mentioned setting up DE's referencing eVar21-25, but I only see DE's for evar24 and evar25.  So it looks like you are missing DE's for eVar21-23.

Secondly, for the ones you have created (eVar24-25), you reference them as evar24 and evar25, but they are eVar24 and eVar25 (capital "V").  Javascript variables are case-sensitive.

Thirdly, the one for eVar25 you have labeled as "Funnel Level ". So it looks like you included quotes in your DE name.  Firstly,  it's not following the same convention as your other DE names, and it will make for clunkier code if trying to reference it in javascript. You'd have to do

_satellite.getVar('"Funnel Level "')

or

_satellite.getVar("\"Funnel Level \"")

I haven't tested it, but this also is likely going to cause problems in the %data_element_name% field syntax, as well.  Because I look at the output rule code and it looks like DTM strips the quotes from the reference:

So long story short, you should probably remove the quotes (and trailing space) from your DE name.

And lastly, as mentioned before, you do not have DE's setup for eVar21-23. And I cannot see in the output DTM code that you have anything setup to pop them, either. I found no rules in the output DTM referencing eVar21-23.

You may or may not still have issues with timing, but you will need to fix the above stuff first.  So do these and then we'll go from there, if necessary.

.josh

17 replies

January 8, 2018

Okay so if the Data Element is type JS Object and that is indeed what you are pointing at, then at face value, the issue is not with your Data Element, but somewhere else.

Next likely culprit is there may be a timing issue between where/when dtmAnalyticsData is on your page vs. when you are trying to reference your Data Element in whatever rule. 

Kinda getting into "Can't help without being able to see it on a site" territory, though..

January 8, 2018

Thanks for your feedback. Here's the URL to the page:

https://thepointsguy.com/2017/12/delta-one-lax-jfk-flight-review/

On Mon, Jan 8, 2018 at 10:41 AM, joshd7227840 <forums_noreply@adobe.com>

jdonleyAccepted solution
January 8, 2018

Okay so a couple of things I see.

First, here is what I see on the page for dtmAnalyticsData:

And here are the Data Elements I see:

So firstly, you originally mentioned setting up DE's referencing eVar21-25, but I only see DE's for evar24 and evar25.  So it looks like you are missing DE's for eVar21-23.

Secondly, for the ones you have created (eVar24-25), you reference them as evar24 and evar25, but they are eVar24 and eVar25 (capital "V").  Javascript variables are case-sensitive.

Thirdly, the one for eVar25 you have labeled as "Funnel Level ". So it looks like you included quotes in your DE name.  Firstly,  it's not following the same convention as your other DE names, and it will make for clunkier code if trying to reference it in javascript. You'd have to do

_satellite.getVar('"Funnel Level "')

or

_satellite.getVar("\"Funnel Level \"")

I haven't tested it, but this also is likely going to cause problems in the %data_element_name% field syntax, as well.  Because I look at the output rule code and it looks like DTM strips the quotes from the reference:

So long story short, you should probably remove the quotes (and trailing space) from your DE name.

And lastly, as mentioned before, you do not have DE's setup for eVar21-23. And I cannot see in the output DTM code that you have anything setup to pop them, either. I found no rules in the output DTM referencing eVar21-23.

You may or may not still have issues with timing, but you will need to fix the above stuff first.  So do these and then we'll go from there, if necessary.

.josh

January 8, 2018

Hi Josh,

So this is the source code I'm dealing with:

var dtmAnalyticsData =

{"channel":"REVIEWS","url":"\/2017\/12\/delta-one-lax-jfk-flight-review\/","pageName":"delta-one-lax-jfk-flight-review","author":"Daryl

Chua","eVar20":"business class, Delta, Delta Air Lines, Flight Review,

Flight

Reviews","eVar21":"12252017","eVar22":0,"eVar23":1413,"eVar24":"","eVar25":"Delta,

Delta SkyMiles"};

The way I defined the data element for eVar 20, eVar 24, and eVar 25

follows this structure on DTM:

window.dtmAnalyticsData.eVar20

Is there something I'm missing?

-Robert

On Mon, Jan 8, 2018 at 1:49 PM, joshd7227840 <forums_noreply@adobe.com>

January 8, 2018

Yes, at a minimum, you are missing a number of things, which I detailed above.

I looked at your page again and it looks like you fixed the evar vs. eVar reference, and I do see that eVar25 now pops in the AA request.

But I see that you have not fixed the issue with wrapping your "Funnel Level " Data Element in quotes and the trailing space after it, so I do not see eVar24 pop.  But the page doesn't show that there is even a value in dtmAnalyticsData.eVar24 anyways (it's just an empty string), so AA's eVar24 wouldn't get popped anyways.

January 8, 2018

Hi Josh,

So when you mention the "Funnel Level " data element in quotes are you

referring to the data element name or path?

-Robert

On Mon, Jan 8, 2018 at 3:16 PM, joshd7227840 <forums_noreply@adobe.com>

January 8, 2018

The Data Element name. Look at my 2nd posted screenshot in previous post.  That ss shows what is in _satellite.dataElements in the js console.

I have done some more poking and I can verify you don't actually have quotes in the DE name (it looks the same from the js object dump but it's not actually access the same, so i was able to verify you actually don't have quotes in the DE name).

But there is definitely a trailing space. I don't think that's technically a problem though.  I do see that the Rule config correctly shows the trailing space in %Funnel Level % reference.  But you should probably remove it anyways, because you probably won't notice it later on down the road if you need to reference it w/ js code in a custom code block in the future.

So I think overall the only issue left with eVar24 not popping in the AA call is that window.dtmAnalyticsData.eVar24 simply has no value on this page (it's an empty string). Because if I put this into the js console:

dtmAnalyticsData.eVar24 = 'foo';

_satellite.pageBottom();

I see eVar24 pop in the AA request.