Export ready for adwords - html output

Hi,
I’m using, and loving hype.
My workflow is Sketch -> one Hype document with multiple scenes with sizes of various adword files
It all works great but I can’t force hype to do 2 things for me:
1 - include extra tag in head "meta name=“ad.size” content=“width=120,height=600” " reflecting scene size (not document)
2 - delete numbers after "hype_generated_script.js"
This results in manually editing each file (sometimes 20).
Is there any way to do this?

I’m not quite sure what you’re trying to do, but it seems you can use JavaScript to access or create a “meta” object…

Here is screenshot of html exported from Hype showing what I’m trying to do :slight_smile:

Here’s an export script you can try:

It inlines the generated JS code and ads the ad.size code at the top of the page (and makes a zip file for you) in one click.

Here’s how to use it: http://tumult.com/hype/export-scripts/

If it works well for you we’ll add it to our list of export scripts.

1 Like

Hi,

Thanks, you are my hero!
It works!
The only thing - file has to be on local drive. On nas it creates folder with .zip extension.

If you save it locally, and then move the resulting .zip file to your NAS, does it work as expected? (Instead of saving to a location on a network folder)

I’ve been away for some time but checked - yes, I can save zip locally.
It works for multiple scenes with no issues.

Thank you very much!!!

1 Like

Please add SVG support to the script. I get a tspan error when I run it on the validator tool.

Other than that, this is much better ( incredibly faster) than the pain I have to go through with Animate CC.

Can you share your SVG file?

Here’s a great tool I encountered recently for automatically optimizing SVGs when dropping them in a folder: https://github.com/svg/svgo-osx-folder-action

I figured out what the problem was. I had text on an SVG, went back to Illustrator applied Create Outlines from Text, saved as SVG - no more tspan tags. Now the validator tool shows no errors. I guess Animate CC converts text to paths automatically when I publish.

Thanks!

EDIT: When will you include this in the Export Scripts package?

Google doesn’t stop to make thing hard. Now they are changing adwords and since yesterday all banners generated with adwords-hype-export.py are rejected. Guess due to JS code inlined in html file. Tried advanced export with mannually added "meta name=“ad.size” content=“width=XXX,height=XXX” and numbers removed from “hype_generated_script.js” and it seems to work. Any chance to make a script with JS script outside htm?

Wojtek

EDIT - Looking at adwords-hype-export.py (with my 0+ knowledge of programing) I found a line inserting Exitapi script. Removed it, and now adwords seems to accept banner. Will wait if they will approve it for publication.

Great keep me posted. Unfortunate to hear Adwords is shaking up their requirements. This post has more info: Google will no longer support HTML5 ads with clickability! - Banner Animation - GreenSock

.....

I updated the Adwords export script to more completely remove the Exit API function. Here’s a list of recent changes: https://gist.github.com/themorgantown/766d6709793e2c2d88e65a0cd502cfa1/revisions

I’m getting all green lights in Adwords with this.

I meant this works.

Is there a way to disable 2X retina image export? I’m constantly going over the 150kb adwords limit because of it and I cannot simply delete the 2X pic, because it doesn’t work on internet explorer.

Select your image in the resource library, and uncheck ‘Automatically optimize when exporting’.

Here’s more info about image optimization: http://tumult.com/hype/documentation/3.0/#image-optimization