Developer forum

Forum » Templates » GA tracking on the shopping receipt

GA tracking on the shopping receipt

Martin Gammelholm
Reply

Hi,

One of our customers would like to track traffic from the shopping cart receipt into Google Analytics.

However, the receipt URL is always unique, so how can we track it using GA, anyone got any knowledge about this?

 

BR
Martin


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

You can specify a tracking url in _trackPageview() and override the actual url used tracking.

Best regards,
Mikkel 

Votes for this answer: 1
 
Merethe Nielsen
Reply

Hi Martin,

In 8.4.0.0 we made a receipt tag based on a request from here:
http://developer.dynamicweb-cms.com/forum/feature-requests/feature-requests/load-part-of-ecom-receipt-only-once.aspx
 

The tag is Ecom:Order.ReceiptShowCount and is available in the ecom reciept. The count is updated if the reciept  page is refreshed.

 

if Ecom:Order.ReceiptShowCount < 1 then

/*insert Google Analytics Tracking Script

end if

 

Something that you can use?

 

Kind regards,

Merethe

 
Martin Gammelholm
Reply

Thanks for replying.

Both answers are great, but unfortunately we can't upgrade this solution to 8.4, so we're are going with Mikkels suggestion.

 

 
Jakob Westhausen
Reply

Hey Merethe Nielsen

I think the if statement should look like this:

 

if Ecom:Order.ReceiptShowCount < 2 then

/*insert Google Analytics Tracking Script

end if

or

if Ecom:Order.ReceiptShowCount <= 1 then

/*insert Google Analytics Tracking Script

end if

 

You must be logged in to post in the forum