Versions Compared

Key

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

...

Before using the Verity JS tag, publishers need to set up one or more unique Zone IDs with GumGum. A Zone ID enables Verity to authenticate requests from publishers. A Zone ID comprises a UUID assigned to a set of publisher domains. For example: 

Zone ID

Domains

46b12cfd-9b63-40bf-a632-2710ec8e31bf

client.host.one.com
client.host.two.com

Note: Requests to Verity from domains not assigned to the Zone ID are denied. 

...

  1. The publisher gathers the list of hosts where the Verity JS tag will be used, for example:

    client.host.one.com
    client.host.two.com

  2. The publisher emails verity-support@gumgum.com with the list of host names. At least one host name must be specified.

  3. Verity Support responds with a unique UUID value to be used as the Zone ID, for example:

zoneId = 46b12cfd-9b63-40bf-a632-2710ec8e31bf

If the list of hosts changes, the publisher must contact Verity Support to update the Zone ID.

*Please note, API Keys and Zone IDs will be provided by Verity Team.

Using the Verity JS Tag

To use the Verity JS page tag, the publisher will specify the Verity JS tag in a client-side HTML <script> tag on the pages in their content network and configure their Zone ID and API authentication key.

...

  1. Include the following <script> tag, preferably within the web page <head> tag:
    <script async src="https://js.verity.gumgum.com/vpt.min.js"></script>

  2. Initialize the following configuration object to the windowobject:

    Code Block
    languagejs
    window.verityConfig = {
     apiKey: ‘<API Key supplied by GumGum>’,
     zoneId: ‘<Zone Id supplied by GumGum>’
     }


    Note: The page URL is extracted by vpt.min.js using window.location.href.

  3. Optionally, callback functions may be passed to Verity to execute once Verity API returns a response.
    Note: The response may be for a page classification with any status, so the callback should handle each possible status message. See Page Application Status Codes for details about status messages that Verity may return.

    Code Block
    languagejs
    window.verity.cmd.push(function(data, error) {
       // do something
       });
    }

  4. Callback functions can be implemented to use the Verity result data. For example, a callback could publish targeting keywords using Verity data, then fetch new ads using the Google Publisher Tag googletag.pubads().refresh(). For example:

    Code Block
    languagejs
    window.verity.cmd.push(function(data, error) {
       console.log(‘Verity done’, window.verity.getKeywords(), data, error);
       google tag.cmd.push(function() {
          googletag.pubads().setTargeting(‘keywords’,
            window.verity.getKeywords().concat([‘VERITY’]));
        googletag.pubads().refresh();
       });
    }

...

Code Block
languagejs
<html lang="en">
<head>
    <meta    <meta charset="UTF-8">
        <meta<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>This    <title>This article has contextual ads!</title>
    <script    <script async src="https://js.verity.gumgum.com/vpt.min.js"></script>
    <script    <script async src="https://securepubads.x.net/tag/js/gpt.js"></script>
    <script>
        window    <script>
        window.googletag = window.googletag || { cmd: [] };
        googletag
        googletag.cmd.push(function () {
            console
            console.log('Google Tag 1st command');
            var
            var adSlot1 = googletag.defineSlot('/6355419/Travel/Europe/France', [728, 90],
                   
                    'div-gpt-ad-123456789-0');
            adSlot1
            adSlot1.addService(googletag.pubads());
            adSlot1
            adSlot1.setTargeting('position', ['atf']);
            googletag
            googletag.pubads().disableInitialLoad(); // This would be required
            googletag
            googletag.enableServices();
        
        });

        window        window.verityConfig = {
            apiKey: 'ggbeta-378b61c4-0c03-4700-8dc5-0e24bbe92b37',
            zoneId: '46b12cfd-9b63-40bf-a632-2710ec8e31bf',
        };

        window
            apiKey: 'API_KEY',
            zoneId: 'ZONE_ID',
        };

        window.verity = window.verity || { cmd: [] };
        window
        window.verity.cmd.push(function(data, error) {
            console
            console.log('Verity done', window.verity.getKeywords(), data, error);
            googletag            googletag.cmd.push(function () {
                googletag                googletag.pubads().setTargeting('keywords',
                            window.verity.getKeywords().concat(['VERITY']));
                googletag                googletag.pubads().refresh();
            
            });
        
        });
    <    </script>
</head>

<body>
      <h1>Verity  <h1>Verity enables all websites to serve contextually relevant Advertisment!</h1>
    <div>
        <h2>But
    <div>
        <h2>But first a word from our sponsors</h2>
        <div
        <div id="div-gpt-ad-123456789-0"
                       style="width:728px;height:90px;background:lightcyan">
            <script>
                googletag
            <script>
                googletag.cmd.push(function () {
                    googletag
                    googletag.display("div-gpt-ad-123456789-0");
                
                });
            </script>
        </div>
    </div>

    <article>
        <p>Lorem
            </script>
        </div>
    </div>

    <article>
        <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit.</p>
        <p>Nobis        <p>Nobis nam possimus ut ullam repellat? Animi libero consectetur nihil earum tempora, eos veritatis fugiat laborum totam sint, consequatur, nobis culpa cupiditate!</p>
        <p>Nisi
        <p>Nisi voluptatem sit rerum sed. Magni, voluptatum! Dolore assumenda minima saepe? Nisi, mollitia officia. Eius, deleniti magni?</p>
      ...
    <    </article>
</body>
</html>