Page tree


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PubMatic is planning to deprecate uer_sync.html soon, therefore, it is recommended to use the userSync.js instead. For more detailed information on userSync.js, refer to userSync.js for Cookie-Sync GDPR Compliance 

Synchronous Tag Example


Code Block
languagejs
linenumberstrue
<script type="text/javascript">
        (function(){
            var script = document.createElement('script');
            script.async = true;
            script.type = 'text/javascript';
            script.src = 'https://ads.pubmatic.com/AdServer/js/userSync.js';
            script.onload = function(){
                PubMaticSync.sync({
                    pubId: 12345,
                    siteId: 23456
                });    
            }
            var node = document.getElementsByTagName('script')[0];
            node.parentNode.insertBefore(script, node);
        })();
</script>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

...