Order metric incremented because of external links?

catalinmartin 20-07-2018

On our ecommerce website, I have an issue with the calculation of order metric.

Once I arive on the confirmation page (/payment-successful.html), an Adobe Analytics server call is made, which is ok. But here I have a button for a contest and if you click it, you will be redirected to an external link AND another Adobe Analytics server call is made on my page, with EXIT LINK: undefined and the orderid itself is incremented again.

This will result in my adobe analytics report that for the same order id, I will have 2 orders (or more, depending on how many times you click on that contest button). For data accuracy, I created a custom metric which will count only the unique values of order id, but I don't like this workaround.

order.JPG

I should mention that we tested and there is no possibility that the same order id to be generated for another order (after few days or weeks or months).

Our devs suggested to turn off tracking of external links, is that a solution?

Please let me know if any of you had a similar issue and how you solved it.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

StewSchilling
MVP
23-07-2018

Yes, you can suppress the exit link tracking.  This can be done selectively within the Link Tracking configuration of your AA Launch Extension (or DTM AA Tool).  Below is the section for the Adobe Analytics extension in Launch. Note that "Track Outbound Links" is selected.  This checkbox enables automatic exit link tracking.  Under that is a widget labeled "Never Track".  You can add the domain of your exit link here to indicate that it should not be tracked.  In your case, the link you speak of might be on "paypal.com", so you'd enter that in the never tack list.

Screen Shot 2018-07-23 at 10.09.25 AM.png

This will probably solve the issue that you are facing, but it will only resolve a symptom.  From what you've said, I think you might want to call s.clearVars() after you send the purchase beacon.  This would keep you from sending the purchase event inadvertently on subsequent beacons sent from the same page.  For this, I'd suggest adding the AA Clear Variables action after the Send Beacon action (if you are using Launch).  Or, a solution that would work in both DTM & Launch is to add the following to your AA custom code:

s.registerPostTrackCallback(function(){

  if (s.events && s.events.match(/purchase/)){

    s.clearVars();

  }

});

Answers (12)

Answers (12)

Gigazelle
Employee
23-07-2018

You'll also want to make sure linkTrackVars doesn't have your order eVar, and linkTrackEvents doesn't include purchases. If you don't have this variable defined, then it will send all variables in your image request. Stewart's recommendation on using clearVars() would also be a viable solution.

StewSchilling
MVP
20-07-2018

Hmmmm.  If you are sending the same purchaseID in both calls your order count absolutely should not be incrementing.

The mechanism behind making those calls doesn't matter (page load rule, direct call, event, s.t(), s.tl()).

There's something else happening here...

StewSchilling
MVP
20-07-2018

The Orders, Units, and Revenue metrics in AA are driven by the "purchase" event.

In order to keep them from being over-counted, the purchaseID variable should be set with a unique id (alphanumeric and no more than 20 characters).  If AA sees the same purchaseID more than once, the hit is marked as a duplicate keeping your metrics correct.

My first suggestion is that you make sure that s.purchaseID is being set. Docs here: purchaseID

I tend to also set s.transactionID where ever I set s.purchaseID.  Doing so allows you to upload offline data against each transaction (such as returns, cost of goods, etc).  You'll need to enable transactionID's on your report suite as a part of this task, but it's free and easy to do. Docs here. transactionID

Last, If you don't want that external link to be tracked, you can suppress it by adding the link domain to the 'never track' list on the AA tool in DTM under "Link Tracking"

catalinmartin 23-07-2018

Purchase event is defined in a page load rule which has defined the following path: /payment-successful.html

This payment-successful page is reloaded/refresh after the second load (with EXIT LINK).

Is it possible to add a condition or something in the page load rule? Or only to suppress this exit link, which, by the way, is always undefined.

Thank you.

catalinmartin 23-07-2018

On the first load I have Transaction ID, Purchase ID and that evar (which is Order ID).

On the second load (with EXIT LINK) I have only the evar (Order ID).

I have the same events triggered in the first and second call and I see also purchase event...is that the issue?

StewSchilling
MVP
23-07-2018

Are you certain that s.purchaseID is being set on the second load of the confirmation page?

Are you certain that s.purchaseID is the same value on the first and second loads of this page?

StewSchilling
MVP
20-07-2018

I just went back to your original post.  I see "Order ID" as the dimension in your workspace table. Is that an eVar (or did they add the ability to report directly on OrderID)?

catalinmartin 20-07-2018

Thanks for your answer, indeed, purchaseID & transactionID are set together.

purchaseID is unique, I can confirm.

I see now in DTM that purchase event & purchaseID evar are set in one of the page load rules, so it makes sense that order metric to be incremented since the confirmation page loads again after clicking on that button. Shouldn't be in event or direct call rules? Wdyt?