Questions tagged [data-layers]

134 questions
0
votes
0 answers

Access dataLayer object from usercentric.eu in Next.js/js on refresh page

What I'm trying now is to have access to a dataLayer object from usercentric with this code: const getDataLayerValue = (keyToFind: string, objects: DataLayerType[]): boolean | undefined | string => { for (const obj of Object.values(objects)) { …
Paleo
  • 3
  • 3
0
votes
0 answers

How can I access a pages dataLayer using Chrome Extension Manifest V3?

I have the below script running on my script.js file and everything runs as expected but it does not recognise the dataLayer variable? chrome.tabs.query({ active: true, currentWindow: true }).then(function (tabs) { var activeTab = tabs[0]; var…
0
votes
0 answers

What reasons are behind the firing of many pageview events on a Data Layer?

We are starting to do a migration from a UA property to a GA4, the team shared with us the prod page; we have an issue of many pageviews firing when we reload the page (min of 5 pageviews to 10 pageviews). Client told us there is no Data Layer…
XZ06003
  • 3
  • 2
0
votes
0 answers

Woocommerce Data Layer dynamic values for Matomo Tag Manager

In order to track Ecommerce interactions using the Matomo Tag Manager with Data Layers I need to insert this Code as described in the documentation (step 4): https://matomo.org/faq/tag-manager/faq_35847/ window._mtm = window._mtm ||…
0
votes
0 answers

Is linking possible in queries in react query

consider I have a task app with differnet groups and filters. For each filter in each group we are creating query. We have have common tasks in differnt queries eg: Query-1 queryKey - ["group1", "assignedToMe"] queryData - { taskOrder:…
0
votes
1 answer

How Can I Pass a dataLayer Variable From One Domain to Another Domain Using GTM

How can I pass a dataLayer variable from one domain to another domain using Google Tag Manager? Both domains use the same GTM container. Thank you.
ImASkuller
  • 39
  • 5
0
votes
2 answers

Check if a property of an object is present in an array

I want to create a script (for Google Tag Manager) that checks if an object's property is present in an array: var array1 = [X, Y, Z] var array2 = [ {item1=value1,item2=value2,item3=value3}, {item1=value1,item2=value2,item3=value3} ] var total =…
Criquet
  • 1
  • 1
0
votes
0 answers

Ecommerce DataLayer Product Price Variant

I need help with one particular topic. I want 2 custom javascript variables in Google Tag Manager. One should return the price of one or more products from one specific product VARIANT and the other variable should return the price of one or more…
Krateros
  • 1
  • 1
0
votes
1 answer

GA4 purchase event revenue not matching order value

The purchase event on shopify purchases is showing revenue values that are close but do not match the purchase value. The event value appears correct, but ecommerce revenue seems to be changing the value a small amount. Any ideas on a fix? The 60…
0
votes
0 answers

When push GTM data layer, how to override old data?

window.dataLayer = window.dataLayer || [] window.dataLayer.push(gtmDataLayerObject) We are using window.dataLayer.push method for pushing data to GTM, So initially it working fine, after change any page and we push new data in dataLayer show both…
0
votes
1 answer

How to store function getPageTypeFromDataLayer as a variable and reference the variable?

My function (getPageTypeFromDataLayer) is being called multiple times and I think it would be best to store it as a variable and then reference the variable but not sure how to set it up. Can anyone help? Code: export const getPageTypeFromDataLayer…
0
votes
0 answers

Using a dataLayer event as a trigger in Adobe Expereince

I am trying to use a dataLayer event to trigger a rule on Adobe Exp. I've done it before on GTM but I have no testing ground where Adobe is deployed to test it out. Here's the event, which is pushed into the dataLayer after a specific click.…
0
votes
0 answers

How to validate datalayer that i've pulled from the chrome console

I am using the following code to get data layer, help me how to validate the data layer. Is there any way to validate the data layer? Is it possible to use assertion here? If so how? public void datalayer(String data[]) { …
0
votes
2 answers

How to capture datalayer object and print in my eclipse console using selenium

I need to capture the datalayer from the console tab in the chrome developer tools
Ragav
  • 5
  • 3
0
votes
0 answers

Javascript: This language feature is only supported for ECMASCRIPT_2015

I have simple script in new version of Javascript which I need to use in Google Tag Manager. Google Tag Manager not supporting new Javascript so my script is necessary to be in older version of Javascript. I already changed all my const's and let's…
1 2 3
8 9