Where to Embed your MAX Stream Tag in your Webpage

MAX Stream Tags are intended to be embedded into your generic HTML page <head> so it can be used from multiple pages.

To embed your MAX Stream Tag, perform the following steps:

  1. Obtain your MAX Stream Tag embed code from the Portal. For further details, please see How to Copy a MAX Stream Tag Embed Code. Your MAX Stream Tag should resemble the following example:
    <script src="//cdn.vidible.tv/prod/max-stream-client/latest/max.js" max-id="5a55ef4feb622f000113e0e4" article-id="{YOUR_ARTICLE_ID}"></script>


  2. Embed the MAX Stream Tag between your webpage <head> tags.
    The following example is basic HTML template of a webpage including a placeholder highlighted in red marking the correct location where you should place the MAX Stream Tag:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Page Title</title>
    {EMBED_MAX_STREAM_TAG_HERE}
       </head>

       <body>
         <h1>My First Heading</h1>
         <p>My first paragraph.</p>
       </body>
    </html>


    After embedding the MAX Stream Tag your HTML document should resemble the following (the MAX Stream Tag is highlighted in blue):

    <!DOCTYPE html>
    <html>
       <head>
         <title>Page Title</title>
         <script src="//cdn.vidible.tv/prod/max-stream-client/latest/max.js"
    max-id="5a55ef4feb622f000113e0e4" article-id="{YOUR_ARTICLE_ID}"></script>
       </head>

       <body>
         <h1>My First Heading</h1>
         <p>My first paragraph.</p>
       </body>
    </html>

     

  3. Important! Implement a custom function in your webpage that will replace the {YOUR_ARTICLE_ID} placeholder within the MAX Stream Tag with the article identifier of the article page that is requesting the MAX Stream Tag.

    Note: You can replace the placeholder name with any value you like for easy use with Regular Expressions target replacement.

    Note: This step should be implemented by your website developer.
Have more questions? Submit a request