1

When using the GTM (Google Tag Manager) dataLayer variable, is it ok to pass objects whose properties are revealed via getters? In the image below, the last item pushed to the dataLayer array shows ellipses (...) for the properties. When hovering over the ellipses you get the message "Invoke property getter".

I want to confirm whether this can be a problem for GTM or not.

dataLayer object contents

1 Answer 1

2

It will cause the issues in GTM because it's expecting simple JS properties and not getters. In gtm.js it just reading properties and not executing them

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.