Rich-text Reply

Revenue Goal ("purchases") Not Tracking Correctly

atikahmd 02-07-18

Revenue Goal ("purchases") Not Tracking Correctly

[ Edited ]

Hi all. I'm using Optimizely for our website built on Shopify. I recently added a revenue goal but it's been giving incorrect numbers. I found the numbers are wrong by manually comparing the timestamps from several Shopify paid/complete orders for a particular product against the time when the revenue goal is triggered. Most times the goal is triggered more times than the actual number of paid/complete orders.

 

This link shows the current setup I have on both platforms:

 

1. Snippet on theme.liquid file

2. Snippet in checkout settings for revenue tracking

3. Integration options are all disabled

 

I have yet to validate the numbers with this current setup to wait for orders to come in. 

 

Also, everytime I update the script/snippet, will it be immediately reflected on the running experiments? Or I have to pause them and start a new experiment to ensure correct tracking?

 

Here's the articles I've referred to:

https://help.optimizely.com/Measure_success%3A_Track_visitor_behaviors/Revenue_tracking_goals_in_Opt...

https://help.optimizely.com/Troubleshoot_Problems/Troubleshooting%3A_Goals_don't_track_correctly

 

Any feedback is greatly appreciated.

Thanks.

Level 2

tomfuertes 02-07-18
 

Re: Revenue Goal ("purchases") Not Tracking Correctly

Since you're talking about Shopify and Revenue, the issue isn't in your theme.liquid, but probably in your checkout scripts admin textbox.

My guess is that you haven't wrapped the optimizely revenue snippet in an "if is_first_access" type conditional (so people coming back and viewing the receipt page to see their shipping updates are being counted as new orders).

Here's the optimizely shopify documentation for installing the conversion event. Go back through it step by step and things should match up! https://help.optimizely.com/Integrate_Other_Platforms/Implementing_Optimizely_on_a_CMS_or_e-commerce...

- Tom Fuertes | CTO @ CROmetrics / LinkedIn
"Most Impactful Use of Personalization" and "Experience of the Year" Optie award winner.
Experimentation Hero
atikahmd 02-09-18
 

Re: Revenue Goal ("purchases") Not Tracking Correctly

[ Edited ]

Hi Tim. I did have the snippet in the "if is_first_access". It was at the bottom below other snippets. I moved it to the top but it's still showing incorrect numbers. Here's the code I used:

 

<!-- Optimizely Revenue Tracking Code -->
<script type="text/javascript">
var optimizely = optimizely || [];
var revenueInCents = {{ subtotal_price | money_without_currency }} * 100;

window.optimizely.push(["trackEvent", "eventName", {"revenue": revenueInCents}]);
</script>
<script src="//cdn.optimizely.com/js/524618xxxx.js"></script>
<!-- End Optimizely Revenue Tracking Code -->

 

I kept the "eventName" as is - do I need to change it? I previously changed to "purchases" (the custom event in the goal has the same name) but it wasn't tracking correctly either.

Level 2
Upsell 04-11-18
 

Re: Revenue Goal ("purchases") Not Tracking Correctly

Hi @atikahmd and @tomfuertes – I built an app to streamline Shopify integration, because the manual integration is a surprisingly error-prone process: https://apps.shopify.com/optimizely-1

As far as I know it's the only way to implement revenue tracking without a Plus plan.
Level 2