Developer forum

Forum » Ecommerce - Standard features » Duplicate conversions in GTM

Duplicate conversions in GTM

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where GTM registers duplicated conversions.

This is most probably because people are using the link from the Email receipt to see the details of their order.

In order to avoid this, I need to identify if the Receipt page is loaded from an external source or if the receipt was already displayed once.

Is there a standard way of detecting this?

Thank you,
Adrian


Replies

 
Nicolai Pedersen
Reply

Look at the referer?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

If that's the only option. I will try this approach.

I am surprised that nobody has mentioned this duplication issue before :)

Thank you,

Adrian

 
Andrew Rushworth
Reply

HI just recenty cam upon this and there are three things:

1. The duplication from the email link:
Solution: On the bottomsnippets include the following condition on whether to call the GTM code ( and facebook):  

@GetDouble("Ecom:Order.ReceiptShowCount"<= 1

Full context example:

@{
    if (!string.IsNullOrWhiteSpace(Pageview.AreaSettings.GetItem("Settings").GetString("FacebookPixelID")) && @GetDouble("Ecom:Order.ReceiptShowCount"<= 1)
    {
        snippetsPage.Add("OrderContainer"new Block
        {
            Id = "FacebookPixelEvent",
            SortId = 100,
            Template = RenderFacebookPixelEvent()
        });
    }
 
    if (!string.IsNullOrEmpty(Pageview.AreaSettings.GetItem("Settings").GetString("GoogleTagManagerID")) && @GetDouble("Ecom:Order.ReceiptShowCount"<= 1)
    {
        snippetsPage.Add("OrderContainer"new Block
        {
            Id = "GoogleTagManagerEvent",
            SortId = 110,
            Template = RenderGoogleTagManagerEvent()
        });
    }

2. We have an issue in that the dw code does not distinguish from discount line items - so it renders all the product lines as products in GTM.
Solution: Separated the discounts and products into two lists and then for each product I searched the discount list for a discount and if found applied the discount to the product and added the "coupon" tag to the GTM product item.
I can provide example if you wish.
 

3. Amount formatting. Depending on the culture settings the format had a comma as the decimal separator ( 100,00). 
Solution: GTM doesn't like this, so I formatted to string and replaced the comma with a period.

 

 

 
Nicolai Pedersen
Reply

Are you sure you do not just have to send in the orderid to GTM - and then Google will only count it once?

 
Andrew Rushworth
Reply

NO, the problem is the session - if you open from the email link, it then opens a new session and increments it.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Andrew,

Thank you very much for the suggestion.

The missing part on my end was the Ecom:Order.ReceiptShowCount.

@Nicolai Andrew is right Google cannot distinguish just based on the orderID.

There are a few more requests that we have received from the SEO consultant and maybe they are helpful for future Swift features:

1. make a single ProductImpression call for the entire product list instead of individual ProductImpression

2. Add addToCart event in the cart when quantity changes

3. Add removeFromCart event

In Rapido we'll have to find custom solutions for this but in Swift maybe it makes sense to add them.

Thank you,
Adrian 

 

You must be logged in to post in the forum