Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ const get = (obj, path, def) => {
if (dataLayer && gtmId) {
// Get object from dataLayer that matches the gtm.uniqueEventId
let obj = dataLayer.map(o => {
//add additional check for values not supported by copyFromWindow
if (!o) return {};

// If a regular dataLayer object, return it
if (o['gtm.uniqueEventId']) return o;
// Other wise assume it's a template constructor-based object
Expand Down