nextjs-google-analytics icon indicating copy to clipboard operation
nextjs-google-analytics copied to clipboard

Add page specific data layers and variables to documentation

Open jordanlambrecht opened this issue 3 years ago • 2 comments

Thank you for building this. It's one of the few packages out there of its kind. Question: How do I add page-specific data layers?

Example A: I have different categories of content. Blogs, Team Members, Portfolio Pieces, etc. How would I let GA4 know which is which?

Example B: I have an online shop where each product gets its own page; how would I be able to let GA4 know which products are added to a cart along with associate prices/information to those products?

Bonus: It would be great if there were some information in the documentation on how to get this up and running on the Google Analytics admin dashboard as well.

jordanlambrecht avatar Jul 29 '22 21:07 jordanlambrecht

Hi @jordanlambrecht !

Those are great suggestions, thanks you so much from raising them.

I would love to work on the documentation but unfortunately time is limited, but glad to merge any PR doing this.

MauricioRobayo avatar Aug 16 '22 02:08 MauricioRobayo

@jordanlambrecht @MauricioRobayo Looks like pretty old conversation, I was looking for data layer option but didn't found anything on the doc. Any example how we can pass/update data layer ? Thanks in advance :)

mehidi258 avatar Jan 11 '24 18:01 mehidi258