Skip to main content
Participant
November 20, 2023
Question

Export multiple versions of the same creative but with different clickthrough URLs?

  • November 20, 2023
  • 1 reply
  • 543 views

Hi 🙂

I'm hoping someone may know of a quick workflow or script that would allow me to have a single banner ad creative, but when I export it would create multiple versions of that creative with different clickthrough URLs?

 

For example, one 300x250 MREC creative - when exported would create versions for:
URL 1

URL 2
URL 3

 

So we'd end up with 3 exported MREC's, each one with a unique clickthrough URL.

 

Not best practice but for several reasons this is what is required unfortunately!

 

Any advice would be greatly appreciated! We currently use a HTML template for export, so the width, height etc are automatically added into the HTML for Google Ad Manager.

 

Thanks!

    This topic has been closed for replies.

    1 reply

    JoãoCésar17023019
    Community Expert
    Community Expert
    November 21, 2023

    Hi.

     

    I guess this is possible through JSFL. You could modify the required URL in the code and then publish the document.

     

    Can you show us the code you're using in your banners?

    Regards,

    JC

     

     

    Participant
    November 21, 2023

    Hi 🙂

    Appreciate the response!

     

    I've attached the code we're placing into the Publish section in Animate CC.

     

    <!DOCTYPE html>
    <!--
    NOTES:
    1. All tokens are represented by '$' sign in the template.
    2. You can write your code only wherever mentioned.
    3. All occurrences of existing tokens will be replaced by their appropriate values.
    4. Blank lines will be removed automatically.
    5. Remove unnecessary comments before creating your template.
    -->
     
    <html>
    <head>
     
    <meta charset="UTF-8">
    <meta name="authoring-tool" content="$VERSION">
     
    <title>$TITLE</title>
    <!-- write your code here -->
     
    $CENTER_STYLE
     
    $ANIMATE_CC_SCRIPTS
    $SCRIPT_START
    var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
    function init() {
    canvas = document.getElementById("$CANVAS_ID");
    anim_container = document.getElementById("$ANIM_CONTAINER_ID");
    dom_overlay_container = document.getElementById("dom_overlay_container");
    $CREATE_LOADER
    $LOAD_MANIFEST
    $PRELOAD_ASSETS
    }
    $HANDLE_FILE_LOAD_START
    $HANDLE_FILE_LOAD_BODY
    $HANDLE_FILE_LOAD_END
    $HANDLE_COMPLETE_START
    //This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage.
    $CREATE_STAGE
    //Registers the "tick" event listener.
    $START_ANIMATION     
    //Code to support hidpi screens and responsive scaling.
    $RESP_HIDPI
    $HANDLE_COMPLETE_END
    $PLAYSOUND
    $SCRIPT_END
     
     
    <meta name="ad.size" content="width=$WT,height=$HT">
    <script type="text/javascript">
    var clickTag = "http://www.google.com"; </script>
     
    <style>
    #clicktag{
    cursor: pointer; 
    cursor: hand;
    }
    </style>
     
     
    </head>
    <body onload="init();" style="margin:0px;">
    <a href="javascript&colon;window.open(window.clickTag)">
    <div id="$ANIM_CONTAINER_ID" style="background-color:$BG; width:$WTpx; height:$HTpx">
    <canvas id="$CANVAS_ID" width="$WT" height="$HT" style="position: absolute; display: $CANVAS_DISP; background-color:$BG;"></canvas>
    <div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:$WTpx; height:$HTpx; position: absolute; left: 0px; top: 0px; display: $CANVAS_DISP;">
    </div>
    </div>
        $PRELOADER_DIV
    </a>
    </body>
    </html>