Google Tags - Modx conflict

Hello Community,

Need your help on something, if possible.

I am using googletags to display ads in my website and i have some conflict issues with MODx [] system.

Below is the code i want to include in my inside a specific javascript

googletag.defineSlot(‘/9520043/website/leaderboard_a_970x250_728x90_300x100’, [[728, 90], [300, 100], [970, 250]], ‘div-gpt-ad-1702892304010-0’).addService(googletag.pubads());

Exported from google ads system.

The problem here is this → [[728, 90], [300, 100], [970, 250]],

Is there any way to bypass?

Final output is this → googletag.defineSlot(‘/9520043/website/leaderboard_a_970x250_728x90_300x100’, , ‘div-gpt-ad-1702892304010-0’).addService(googletag.pubads());

As you can see the whole parameter → [[728, 90], [300, 100], [970, 250]] is missing.


Try putting a space character between the two opening square brackets → [ [728, 90], [300, 100], [970, 250] ]

Thanks a lot !!!

Adding space did the job!!

So easy :slight_smile: you make my day!!

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.