Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

258
Views
Is it possible to get user data from dataLayer on GTM?

I'm new to Google Tag Manager – GTM. I have a webpage where Google Tag Manager scripts are embedded. I set several events which push objects to dataLayer as dataLayer.push({KEY: VALUE}). My question is how can I retrieve the data which added/pushed before.

For example, let's say there is a <button onclick="dataLayer.push({'item': 'shoes A'})">Purchase</button> on the e-commerce site and a user clicked the button to purchase the item. Then, if the user comes back to the page on the next day, how can I get the user's previously bought item information from dataLayer, which is {'item': 'shoes A'}. I might misunderstand how the dataLayer works but wondering whether it is possible. Or, dataLayer is a variable just for passing information to Google Tag Manager? Not for retrieve data?

Sorry for the basic question but could not figure out well by looking at tutorial sites. If any advice, that would be very appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As said in the comments:

The data layer is purely used for adding to Google's data to build the statistics panels in the Google Analytics pages.
Google Analytics is not a relational database. You cannot query individual data sets back.

If you want to keep track what things you have pushed you should keep a permanent record (maybe generated from the cart contents then?) in database or session variables.

Google's dataLayer documentation for developers:
https://developers.google.com/tag-manager/devguide

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!