Expand my Community achievements bar.

SOLVED

Analytics 15% discrepancy compared to backend database

Avatar

Level 2

Hi all,

We currently have an issue that is we have a ReportSuite for a production environment that is being utilized by two websites. One website is using DTM and the other is using javascript. Now the issue is that the website using the java script is having a 15% discrepancy in confirmed purchases versus what is in the database (ex. out of 100 purchases only 75 purchases are logged in analytics on average), the website using the DTM has only 1% discrepancy. My question here is that why is this happening? is there a browser issue/limitation to some users and these are unable to send the tags to analytics? Below is the sample script format of what the problem site is sending. Appreciate your response as we are having big issues with our marketing

<script>

var s_account = "Prod reportsuite";

var s_c_charSet = "UTF-8";

var s_c_linkInternalFilters = "javascript:,travelguard us,#";

var s_c_busUnit = "Property & Casualty";

var s_c_formList = "";

</script>

<script defer="defer" src="/us/Scripts/s_code.js"></script>

<script>

$(function(){

s.eVar28 = "tg us GPP";

s.eVar31 = "us";

s.eVar33 = "en";

s.channel = "personal";

s.prop2 = "personal:travel";

s.prop3 = " ";

s.prop28 = "tg us GPP";

s.prop29 = "property-and-casualty";

s.prop31 = "us";

s.prop33 = "en";

s.prop34 = "Travel";

s.eVar61 = "tgGPP";

s.eVar63 = "";

s.events = "scOpen";

s.eVar64 = "tgdirect/defaultlisting/state-selector";

s.eVar20 = "Travel Insurance";

s.pageName = "Travel Guard US:GPP:state-selector";

var temp1 = document.cookie;

if ((temp1.toLowerCase().indexOf('_agent') >= 0) )

{

s.eVar67 = "GPP_agent";

s.prop67 = "GPP_agent";

}

else{

s.eVar67 = "GPP_direct";

s.prop67 = "GPP_direct";

}

s.getAndPersistValue(s.prop67,'s_pers_prop19',1825);

var s_code = s.t(); if (s_code) document.write(s_code);

});

</script>

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Whenever I setup a purchase event I also ensure I capture a transaction ID (most systems should have one). This is key as a purchase event alone in my opinion is not enough info to perform forensic reporting analysis of online sales. The beauty of transaction ID is it would allow a 1 to 1 comparison of a backend data base and give you more detail in finding the root cause here.

What I suspect you may be seeing is users whose browsers have DO NOT TRACK set to on. Also make sure your purchase success event is not firing on a page reload. The java script version as mentioned above could be crashing in some cases as well. Since browser based data collection is subject to many browser and network factors when trying to match 100% to a backend system be prepared for discrepancies.

Good luck

View solution in original post

6 Replies

Avatar

Level 4

It will be super hard to determine the cause as more details will be needed. Are you using the same version?

First and foremost the sample script you provided is sending scOpen instead of the purchase event but let's say that you just provided a random sample code - in that case to answer your question it shouldn't make any difference. Although we encourage everyone to move to DTM, we still have work with several parties that are using the hard-coded script on pages and you should be able to hit the same level of discrepancy as DTM.

If you could provide more details such as links to both sites, I'll be able to help further but you are most likely having a technical issue but it will be hard to say for example is the sample code above embedded within other code on the site that could potentially crash, etc...

Avatar

Level 2

Hi

Thank you for the reply. Yes there is a purchase event

Here is the website that is hitting 15% discrepancy:

https://purchase.travelguard.com/us/tgdirect/defaultlisting/state-selector

then this is the one with 1% discrepancy

https://mvp.travelguard.com/

We are at a total loss with the difference of what is recorded and we are unable to see issues in our code why this is happening

Avatar

Correct answer by
Community Advisor

Whenever I setup a purchase event I also ensure I capture a transaction ID (most systems should have one). This is key as a purchase event alone in my opinion is not enough info to perform forensic reporting analysis of online sales. The beauty of transaction ID is it would allow a 1 to 1 comparison of a backend data base and give you more detail in finding the root cause here.

What I suspect you may be seeing is users whose browsers have DO NOT TRACK set to on. Also make sure your purchase success event is not firing on a page reload. The java script version as mentioned above could be crashing in some cases as well. Since browser based data collection is subject to many browser and network factors when trying to match 100% to a backend system be prepared for discrepancies.

Good luck

Avatar

Level 4

Thanks J,

I took a quick look at it and I do see several issues that are unrelated to purchase that I may point out later but for now, is there a way I can place test purchases without having to charge my card, can I use a test card or will you be able to cancel my purchase or is there a development environment?

I need to step through to see what's happening otherwise I'll just be throwing random maybe responses at you and I get it if it may be sensitive details so please feel free to message me directly with details.

Avatar

Level 2

Thank you all. @Rawsoft I have sent you a private message regarding your request.

Yes we do have transactionID property

<script defer="defer" src="/us/Scripts/s_code.js"></script>

<script>

$(function(){

s.eVar28 = "tg us GPP";

s.eVar31 = "us";

s.eVar33 = "en";

s.channel = "personal";

s.prop2 = "personal:travel";

s.prop3 = " ";

s.prop28 = "tg us GPP";

s.prop29 = "property-and-casualty";

s.prop31 = "us";

s.prop33 = "en";

s.prop34 = "Travel";

s.eVar61 = "tgGPP";

s.eVar63 = "Test User";

s.eVar3 = "1";

s.pageName = "Travel Guard US:GPP:confirmation";

s.products = ";Gold;1;37.00;,;Fee;1;7.00;";

s.eVar9 = "US";

s.eVar6 = "Male";

s.eVar64 = "tgdirect/defaultlisting/confirmation";

s.eVar1 = "8";

s.eVar20 = "Travel Insurance";

s.eVar68 = "1000";

s.eVar69 = "1000";

s.eVar71 = "ONLINE";

s.eVar5 = "27";

s.eVar11 = "20121";

s.eVar2 = "Visa";

s.eVar62 = "000329";

s.prop62 = "000329";

s.eVar70 = "8";

s.eVar66 = "19";

s.events = "purchase";

s.eVar8 = "DE";

s.eVar10 = "1";

s.eVar4 = "Gold";

s.eVar7 = "922971503";

s.transactionID = "922971503";

s.purchaseID = "922971503";

var temp1 = document.cookie;

if ((temp1.toLowerCase().indexOf('_agent') >= 0) )

{

s.eVar67 = "GPP_agent";

s.prop67 = "GPP_agent";

}

else{

s.eVar67 = "GPP_direct";

s.prop67 = "GPP_direct";

}

s.getAndPersistValue(s.prop67,'s_pers_prop19',1825);

var s_code = s.t(); if (s_code) document.write(s_code);

});

Avatar

Community Advisor

Looks like you have all you need to see if a transaction is indeed being captured correctly between 2 data based. I recommend you pick a complete day in teh past. Pull a report by transaction ID(on both ends ) Then see what is disparate. You should pull adobe data with thinks like browser vers, Ip address, product type. These may allow you to see if there is any external factors that may lead to discrepency.

I forgot to ask what is your system platform running on? Angular, PHP, some other type?