Skip to main content
All CollectionsPublishers
Popunder code trigger class solution
Popunder code trigger class solution

popunder trigger issues - popunder codes flagged by google

Ior Ignatius Oliveros avatar
Written by Ior Ignatius Oliveros
Updated over a week ago

To control which items fire a popunder, you can add a "data-trigger-classes" to the invocation code.

For example, you would visit your site and find all the CSS classes for the items you would like to trigger a pop when clicked.
For Example:
On desktop your content photos uses the "i" CSS class & the text under the photo uses the CSS class "vttl". So you would add those classes to the data-trigger-classes like below. This would only fire a pop when you click on the content photo or content text.

It's important for your developers to go through the site & add as many non-navigation classes as possible. That way you can maximize the number of popunders while staying google compliant.

The Desktop code would look similar to this classes wise, but your team should review them.

<div id="adn-4783694" class="" style="">
    <script type="text/javascript" data-trigger-classes="i vttl">
        (function (parentNode) {
            var adnOpt = {"id": 4783694, "pid": 1333, "sid": 573, "type": 4, "width": 0, "height": 0};
            var adn = document.createElement("script");
            adn.type = "text/javascript";
            adn.async = true;
            adn.src = "//a.adnium.com/popunder?fpt=1&ctu=1&tu=1&r=" + Math.floor(Math.random() * 99999999) +
                "&id=" + adnOpt.id + "&pid=" + adnOpt.pid + "&sid=" + adnOpt.sid +
                "&tid=" + adnOpt.type + "&w=" + adnOpt.width + "&h=" + adnOpt.height;
            parentNode.appendChild(adn);
        })(document.getElementsByTagName("script")[document.getElementsByTagName("script").length - 1].parentNode);
    </script>
</div>

Did this answer your question?