3D FlipBook - Flipbook page tracking with Google Tag Manager

p***e@radioabl.ca
2024-01-10
2024-02-05

Is there any working implementation of tracking 3D flipbook pageviews with Google Tag Manager.
Tested with different methods to push the page path to data layer so we can pass it through to GA4 but nothing worked. ( It triggers the event but doesn't pick the page path)

//Pushing 3D Flipbook data to DataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'flipbook_view',
'page_path': ' location.pathname + "/" + scene.ctrl.getPageForGUI()'
});

*scene.ctrl.getPageForGUI() doesn't pass the page location

Please let know if there's a working method to get page path info and push it to datalayer.

Thanks!

Replies

a***r@3dflipbook.net
2024-02-05
2024-02-05

Hi, Since 1.13.0 plugin supports gtag() and ga(). Also you can disable tracking user in the plugin settings. If function gtag is defined at your page then the plugin will call it:

gtag('event', 'pageview', {page_path: '/3d-flip-book/[book name]/[book id]/[page number]'});
Log In to leave a comment