Gemius Creatives Troubleshooting

How to change "Gemius" creatives click_url macro

If the client sends Gemius creatives, we need to modify them, deviating from Gemius' instructions.

Original Gemius creative example:

<script language="javascript1.2" type="text/javascript">
//<![CDATA[
document.write('<scr'+'ipt src="https://hrgde.adocean.pl/_'+(new Date()).getTime()+'/ad.js?id=6O.qlp3G489VMXJZaa4nI1Lk7kAq6ZtA16tbRx8dxt3.m7/nc=0/gdpr=0/gdpr_consent=/redir=" language="javascript"></scr'+'ipt>');
//]]>
</script>

How to change it:

1. Include {click_url} as a new variable in a separate script tag:

<script>
var click = '{CLICK_URL}';
</script>

2. Then add click variable in the end of Gemius tag as shown:

<script language="javascript1.2" type="text/javascript">
//<![CDATA[
document.write('<scr'+'ipt src="https://hrgde.adocean.pl/_'+(new Date()).getTime()+'/ad.js?id=6O.qlp3G489VMXJZaa4nI1Lk7kAq6ZtA16tbRx8dxt3.m7/nc=0/gdpr=0/gdpr_consent=/redir=' + click + '" language="javascript"></scr'+'ipt>');
//]]>
</script>

The full JS tag should appear in the following manner:
<script>
var click = '{CLICK_URL}';
</script><script language="javascript1.2" type="text/javascript">
//<![CDATA[
document.write('<scr'+'ipt src="https://hrgde.adocean.pl/_'+(new Date()).getTime()+'/ad.js?id=6O.qlp3G489VMXJZaa4nI1Lk7kAq6ZtA16tbRx8dxt3.m7/nc=0/gdpr=0/gdpr_consent=/redir=' + click + '" language="javascript"></scr'+'ipt>');
//]]>
</script>



Revision #3
Created 10 November 2023 14:40:56 by Povilas
Updated 6 May 2024 12:15:10 by Elvinas Kazlauskas