Anyone submitted ads to Trade Desk?

Is there a way to make an export script for the Trade Desk?

I went ahead and used those instructions. I'm not sure if there's anything else required; I don't have a TTD account currently. But please give it a try!

Please use these manual install instructions:


  1. Download the export script from:
    https://github.com/tumult/hype-export-scripts/blob/TheTradeDesk/TheTradeDesk/TheTradeDesk.hype-export.py
    (you may need to hit option-return in the browser to get the file to download)

  2. Open the /Applications/Utilities/Terminal.app and enter in this command:

    open ~/Library/Application\ Scripts/com.tumult.Hype4
    

    This will open the Applications Scripts folder; alternatively you can get to this via Hype's Preferences > Exporting > Show Export Scripts Folder in Finder

  3. Move the TheTradeDesk.hype-export.py file into the com.tumult.Hype4 folder

  4. Back in the Terminal, enter this command:

    chmod 755 ~/Library/Application\ Scripts/com.tumult.Hype4/TheTradeDesk.hype-export.py
    

    This will give the export script permission to run.

It should be installed now. In Hype, you should be able to choose the File > Export as HTML5 > TheTradeDesk… menu item.


(Also note that you may need to install the Python Export Script Enabler as well if you've never installed an Export Script before).

Let me know how this works, and if it is good and passes any validation you use on production ads, then I'll make an installer and put it on our export scripts page.

2 Likes

Awesome...let me give it a try and will let you know if it works.

1 Like

Thank you so much! I installed the script and sent over a test to my TTD rep and it uploaded successfully and click tag tracking was successful! Thank you so much. This will help so many of us that have to create assets for TTD. Please let us know when you have an installer ready.

1 Like

Great, thanks! I'll get that out soon and post here.

It is now live on the export scripts page:

https://static.tumult.com/hype/export-scripts/TheTradeDesk/TheTradeDesk.pkg

Let me know if you have any issues with it.

2 Likes

Thanks Jonathan....I have another issue. My vendor is telling me I dont have a clickTag in my export to GDN. It looks like I do and has passed your HTML5 validation page. They vendor sent the attached saying that I need to set the click tag variable per below. I'm not sure what I need to change. Any help would be appreciated. Thanks!
300x600_Kwikset_Unite 8.29 Test.zip (146.1 KB)

I assume you're exporting with the "DoubleClick DCM" Export script?

This doesn't exactly match that format as it allows for a specific element to call into the exit, instead of the entire ad being surrounded by an <a> tag to call the exit. I'd be curious why your vendor needs this as a requirement - if it is failing some later validation or something?

Regardless, it would be easy to make a new export script to satisfy this format, since TheTradeDesk export script uses the surrounding <a> tag. I think maybe first I'd ask that you manually modify the output and see if that passes your vendor's checks.

To do this, unzip the ad and open the index.html file in an editor. Find these lines:

	<div id="300x600kwiksetunite829test_hype_container" class="HYPE_document" style="margin:auto;position:relative;width:300px;height:600px;overflow:hidden;">
	</div>

And enclose them so the result is:

<a href="javascript:window.open(window.clickTag)">
	<div id="300x600kwiksetunite829test_hype_container" class="HYPE_document" style="margin:auto;position:relative;width:300px;height:600px;overflow:hidden;">
	</div>
</a>

Test the ad in a browser to make sure it still works. Then re-zip all the files and submit the new zip file.

Let me know what the vendor says or if you have any questions. If there's any more uncertainty, I'm happy to talk to the vendor directly as well.

Hi Jonathan...thank you for the quick reply. Yes, I'm exporting from the DoubleClick DCM script. I'm not really sure why they are asking for this requirement. FYI...I'm not sure if this matters or where I found this years ago but I've been using clickTag and http:// in the Export Script Arguments. Let me try editing the html file and will let you know what they say. Thank you!

1 Like

Yeah, the DoubleClick DCM script will take the clickTag value in the export script and place it in the ad's .html like so:

	<meta name="ad.size" content="width=${width},height=${height}">
	<script>
		var clickTag = "${clickTag}";
	</script>

So that part is identical to what they want. The only real difference is the surrounding <a> tags.

@jonathan Could we get a version of The Trade Desk export script where the runtime is hosted on the CDN instead? The JS is sizeable considering we've only got 200KB to work with and Trade Desk doesn't require that to be zipped locally.

That should be configurable within the Export script itself

if args.get_options:		
	def export_options():
		return {
			"exportShouldInlineHypeJS" : True,
			"exportShouldInlineDocumentLoader" : True,
			#"exportShouldUseExternalRuntime" : False,
			#"exportExternalRuntimeURL" : "",
			"exportShouldSaveHTMLFile" : True,
			"exportShouldNameAsIndexDotHTML" : True,
			#"indexTitle" : "",
			"exportShouldBustBrowserCaching" : False,
			"exportShouldIncludeTextContents" : False,
			"exportShouldIncludePIE" : False,
			"exportSupportInternetExplorer6789" : False,
			"exportShouldSaveRestorableDocument" : False,
		}

That makes sense! I used the packaged script installer and located the .py file I need to update. However, it's not clear to me which export option value should be changed. I tried a few adjustments, but I haven't been able to successfully remove the local JS export.

I seems like any changes I make to Application Scripts / com.tumult.Hype5 / TheTradeDesk / TheTradeDesk.hype-export.py don't actually affect my Hype export. There must be a step I'm missing.

You'll want to use the file in com.tumult.Hype4 and not Hype5 (as that is done for future compatibility).

You'll need to uncomment these lines:

#"exportShouldUseExternalRuntime" : False,
#"exportExternalRuntimeURL" : "",

And change the values to:

"exportShouldUseExternalRuntime" : True,
"exportExternalRuntimeURL" : "https://cdn.jsdelivr.net/gh/tumult/hype-runtime",

(Or use a different value for the CDN path if you desire, this is just our blessed CDN. If you use your own then you'll need to make sure you put the Hype runtime files there; I can help you with where to get these if you need)

Success! Thank you both for the information!

1 Like

Hey Jonathan...so it looks like the DCM script worked correctly. All they needed was for me to put a URL into the value instead of using http://! Thank you as always for your help.

To clarify, this was with the <a> changes or without them?

Without them. I had been using "http:// " as the export script arguments value for another client. That was throwing off this new vendor...they just needed me to change that to a URL like google.com.

1 Like

Okay cool, then it sounds like no changes are needed on our end if you got it working with the standard export script!