google-tag-manager

How i can insert google tag manager to popup in chrome extension?

半世苍凉 提交于 2021-01-29 06:11:37
问题 I have created chrome extension. I add google tag manager script and no script iframe in popup html like this: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Signals</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true

List of multiple products into php datalayer

无人久伴 提交于 2021-01-29 03:26:18
问题 I would like to get a nice data layer tracking for my site's marketing pixels in the "order confirmation page" (thank you for you purchase page). The site uses OXID Shop as the ecommerce platform. I would like to have the following setup: IF currentPage == 'thankyou': products_info = '[{id: 'product_id_1', price: 'price_1', quantity: 'quantity_1'}, {id: 'product_id_2', price: 'price_2', quantity: 'quantity_2'}]' I am trying the following code to obtain the values directly from the backend if

How to send ga(…) events with Google Tag Manager?

北城以北 提交于 2021-01-28 08:51:34
问题 I'm changing google analytics for google tag manager on an existing website. This website also uses google e-commerce, so I have a few custom ga() calls related to the e-commerce being done on some pages. The problem is that because the google analytics script loads asynchronously, ga() is not defined anymore when I'm trying to send some e-commerce related data. I've found a workaround somewhere: window['GoogleAnalyticsObject'] = 'ga'; window['ga'] = window['ga'] || function() { (window['ga']

GTM not propagating nonce to Custom HTML tags

隐身守侯 提交于 2020-12-15 05:45:07
问题 In order to implement Content-Security-Policy, I need to pass nonce to GTM to allow tags. Using nonce-aware version of GTM snippet works great for all tag types except Custom HTML . Is there a way to pass nonce to Custom HTML and allow custom scripts, without using unsafe-inline ? 回答1: In order to add the nonce attribute to the Custom HTML scripts, it must be first defined as a GTM variable: Add id="gtmScript" to the nonce-aware version of GTM snippet - this will be used to target the element

Virtual page view issues -datalayer- GTM

我怕爱的太早我们不能终老 提交于 2020-07-23 06:53:05
问题 I'm working with this preebuild ecommerce system, all of the checkout is in an iframe. And the event below is pushed at every major step, 'checkout 1','checkout 2','payment details' and 'transaction complete' page & title reflects each steps. But NOTE the event name 'VirtualPageview' is the same for all steps mentioned above. { event: 'VirtualPageview', page: '/Test/test', title 'test | test', gtm.uniqueEventId:25 } Visual in gtm debugger: https://gyazo.com/6356cc13f6b63cad73e55d10abc90154

Virtual page view issues -datalayer- GTM

喜夏-厌秋 提交于 2020-07-23 06:52:16
问题 I'm working with this preebuild ecommerce system, all of the checkout is in an iframe. And the event below is pushed at every major step, 'checkout 1','checkout 2','payment details' and 'transaction complete' page & title reflects each steps. But NOTE the event name 'VirtualPageview' is the same for all steps mentioned above. { event: 'VirtualPageview', page: '/Test/test', title 'test | test', gtm.uniqueEventId:25 } Visual in gtm debugger: https://gyazo.com/6356cc13f6b63cad73e55d10abc90154

Virtual page view issues -datalayer- GTM

此生再无相见时 提交于 2020-07-23 06:51:18
问题 I'm working with this preebuild ecommerce system, all of the checkout is in an iframe. And the event below is pushed at every major step, 'checkout 1','checkout 2','payment details' and 'transaction complete' page & title reflects each steps. But NOTE the event name 'VirtualPageview' is the same for all steps mentioned above. { event: 'VirtualPageview', page: '/Test/test', title 'test | test', gtm.uniqueEventId:25 } Visual in gtm debugger: https://gyazo.com/6356cc13f6b63cad73e55d10abc90154