Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

Hi,

 

I am using a numeric data type attribute to count the number visits on a page. But the counter is incrementing more than once on a single page load.
Example - http://www.sears.com/lawn-garden-chain-saws/b-1255775304. On this page I expect the attribute number '5592' to be incremented by one every time I refresh the page, but I see that the counter is incremented more than once on a single page load in the tealium_va local storage value.

Please help.

 

Regards,

Suchindra Kala

12 REPLIES 12

Incorrect increment in count of attribute value in tealium_va value in local storage

Tealium Employee

@suchindrakala

 

The best way to see the hits that the web page is triggering is by going to the web page, opening the devoloper tools, and filtering the network logs on "i.gif". This image is what sends data from the web page to Tealium's UDH.

 

When I first loaded that URL, I saw 4 triggers.

  1. The standard page load (a POST of data)
  2. Google Cookie Sync (google_gid exists in the request url)
  3. Criteo Cookie Sync (userid exists in the request url)
  4. The page is then calling a utag.link which includes a 2nd event with a POST of data

 

Therefore, I would suggest you update the rule applied to the Number enrichment to include a condition to check if ut.event equals (ignore case) custom value view.

 

view event condition.png

 

This will allow the number to be incremeneted only on true page views and stop incrementing the count incorrectly.

 

Please let me know if this helps.

 

Cheers,

-Dan

Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

Hi Dan
Thank you very much for your reply.

I do see the issue here, but what I do not understand is from these four calls what are the calls that are contributing to the value of the attribute? I do not see the value set to 4 ( which would have been the case if it would have been incrementing the counter on every call)

My understanding is that only the below link should increment the value -

http://datacloud-us-east-1.tealiumiq.com/searshc/main/2/i.gif

 

I just want to know this to have a better understanding of how the tool works.

Regards,
Suchindra Kala

Incorrect increment in count of attribute value in tealium_va value in local storage

Tealium Employee

@suchindrakala

 

I do not know the exact rule that you have in place so I'm a bit hesitant to say what I mentioned is exactly how it will work. However, generally speaking, each call to the i.gif that is made is considered an event within the UDH that are applied to the typical Lifetime Event Count number attribute. This included page views, post page view activity such as link clicks or video milestones, and cookie syncs with 3rd-party DSPs.

 

Can you screenshot the rule being used so I can take a closer look?

 

Secondly, and this is something I forgot to mention in the initial email, but local storage is NOT an accurate representation of the visitor's current profile state. Data Layer Enrichment (the process that updates local storage) is typically 1-2 page views behind, depending on whether or not polling is used, and will rarely truly represent the current state of the visitor. Your best bet to validate what is the current state of a visitor profile is to use a Trace. This will tell you the exact current state and help you verify the data is correct.

 

Please give that a try and let me know your results.

 

Cheers,

-Dan

Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

Hi @dan_george,

That explains why my logic to use Local storage tealium_va value to set a cookie value is not working correctly. 
In this scenario what can I use instead of local storage to set the cookie value that will help me accurately capture the visitor behavior?

Here is the current logic: 

var asData = JSON.parse(localStorage.getItem("tealium_va"))["metrics"];

if (asData[5578] >= 3){

asCookieSet.push("3061246");
}

 

 

Also, we do not have any rule to exclude the Tealium call, and as suggested by you I have changed the logic and added a rule to only count page views calls.

 

Appreciate your help on this.

 

Regards,

Suchindra Kala

Incorrect increment in count of attribute value in tealium_va value in local storage

Tealium Employee

@suchindrakala

 

The best we can do is use the Data Layer Enrichment callback. Scroll to the bottom of that link to see how to add this.

 

The purpose of this is to take the visitor profile response from AudienceStream and run logic when that data is returned. This is much cleaner, and you can easily add logic so it only runs once, etc.

 

window.tealium_enrichment = function(data){
  //console.log("Data Layer Enrichment Callback");
  if (data["metrics"][5578] >= 3){
    asCookieSet.push("3061246");
  }
};

 

Please let me know if this is what you're looking for.

 

Cheers,

-Dan

Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

Hi @dan_george,

As you mentioned in your previous reply that Local Storage is set from Data Layer Enrichment. I am not able to understand why I should use Data Layer Enrichment (instead of Local Storage) if Data Layer Enrichment is also 1-2 page views behind(similar to Local Storage).

 

I see that the Data layer variable bt['va.metrics.5664'] (for http://www.sears.com/appliances-refrigerators/b-1020022) is set on the next page view and so is local storage and I do not see any difference in the values.

 

Regards,

Suchindra Kala

 

 

Incorrect increment in count of attribute value in tealium_va value in local storage

Tealium Employee

@suchindrakala

 

Ah, yes, now we are getting into some of the nitty-gritty!

 

As step 3 in the Data Layer Enrichment article aludes to, the response from the DLE service from the current page (N) puts the visitor profile from the prevouis page (N-1) in local storage, then local storage is read on the next page (N+1), hence the 2 page delay (the difference between N-1 and N+1).

 

 

In a sense, the callback allows you to make use the the N-1 visitor data immediately on the current page (N) and not have to wait until the next page (N+1) to read local storage before it can be sent to a vendor or acted upon.

 

Hopefully that all makes sense, trust me it works ;)

 

Cheers,
-Dan

Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

Hi @dan_george,
I trust you and just want to make sure that I understand what I am implementing :)

What I want to know is how I can check the response from the DLE service on the current page (N) and what is the variable in the bt object (in www.sears.com)? I am just finding it difficult to identify the specific variable that I should use in my code.

 

Regards,
Suchindra Kala

Incorrect increment in count of attribute value in tealium_va value in local storage

Employee Emeritus

Hello @suchindrakala. Let me reach out to your account manager, @melanie_armenda, for some assistance. Stay tuned!!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

Thanks @kathleen_jo & @dan_george for your help. Waiting to here back from @melanie_armenda

Incorrect increment in count of attribute value in tealium_va value in local storage

Employee Emeritus

Hello again @suchindrakala. I'd also like to encourage you submit a support ticket as well. Let me know if you have any further questions!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

Incorrect increment in count of attribute value in tealium_va value in local storage

Silver Contributor
Silver Contributor

@kathleen_jo 

I just opened a support request ticket https://support.tealiumiq.com/hc/en-us/requests/30402

 

 

Public