Analytics
2K members online now
2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Enhanced Ecommerce transaction id is on seperate page than product details

[ Edited ]
Explorer ✭ ✭ ✭
# 1
Explorer ✭ ✭ ✭

Good morning. I am setting up enhanced eCommerce GA using google tag manager. I have the add to cart tracking properly but my issue is once the order is complete it brings the user to a thank-you page with the transaction id. The thank you page only has the transaction id and not all of the product details. Is there a way to carry over the product information variables to the thank you page datalayer?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Matt M
April 2017

Enhanced Ecommerce transaction id is on seperate page than product details

Explorer ✭ ✭ ✭
# 4
Explorer ✭ ✭ ✭

Update to anyone else searching for a solution. I ended up using WebStorage API. I am setting sessionStorage on the purchase page and than am calling the info from sessionStorage on the thank you page. A great run down can be found on Simos blog.

View solution in original post

Enhanced Ecommerce transaction id is on seperate page than product details

Rising Star
# 2
Rising Star

Hey Matt,

 

The best way is to have your Dev team pass these into the dataLayer for you.  While there are a number of hacks you could employ using cookies etc, a programmatic solution that involves IT is really best.   In other words, have them return the data you need in the dataLayer on that final receipt page. 

 

Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Enhanced Ecommerce transaction id is on seperate page than product details

Explorer ✭ ✭ ✭
# 3
Explorer ✭ ✭ ✭

Thanks for the response but this doesn't answer the question. They don't want to change any code on their site that is why I am using google tag manager, which is already added to their site. I obviously would much rather than have the same information on the purchase page as the product/add to cart page but that isn't an option in this case.

Marked as Best Answer.
Solution
Accepted by topic author Matt M
April 2017

Enhanced Ecommerce transaction id is on seperate page than product details

Explorer ✭ ✭ ✭
# 4
Explorer ✭ ✭ ✭

Update to anyone else searching for a solution. I ended up using WebStorage API. I am setting sessionStorage on the purchase page and than am calling the info from sessionStorage on the thank you page. A great run down can be found on Simos blog.

Enhanced Ecommerce transaction id is on seperate page than product details

Rising Star
# 5
Rising Star

Hey Matt,

 

Sorry for no response initially, I did not receive notification that you replied.  That said, Simo is the man and yes that is a solution.   Best to have your devs persist the data server side and pass to the dataLayer whenever possible as that becomes part of their process,

 

Glad you got it solved and thanks for sharing back here.

 

-Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn