Reputation: 6380
I'm using Google Tag Manager to pull in some data for my Google Ads. When I goto a product page, I've just hard coded some product ID's as an example, but I get the following error:
This is how I've defined the product ID's, it's saying multiple ID's need to be in an array, to my understanding they are.
Upvotes: 2
Views: 558
Reputation: 14179
Try to use your GTM variables {{order-items}}
(that contains in your case 193, 194, 195) in a Custom Javascript Variable to generate an array from your comma-separated string, like this:
function() {
var products = {{order-items}};
return products.split(",");
}
Upvotes: 1