How to remove Hard-coded URL

I want to thank everyone that's been helpful with these in the past.
I was asked to remove the hard-coded URL but I am not sure where to begin.
I am using the click tag code as well as this URL:


I thought by simplifying the code to this would help:

They sent me a link to the Google Ad Manager specs and honestly I feel like what I have is correct.

I attachedHARD_CODE_ISSUE.zip (115.9 KB) the project if anyone can assist me with it.

Thanks in advance!

Eric

Hey Eric,

This is a great place to start: https://tumult.com/hype/documentation/#making-ads

It looks like you're not exporting using an export script -- that will make it easy to avoid using the dotheclick function.

You would install the Double Click Studio export script, then select your top level rectangle and go to the Action inspector. Next, choose 'Double click DCM' > Exit in the Mouse Click inspector.

Then, export using that export script using Advanced Export.

It's not clear if you are submitting to to Google Ads or you are just being told to use their specs?

Thanks, Daniel!
I've only been using the Advanced Export CDN checked on.
Just following the specs vendor has asked to use.
By using the DCS export script, that will remove the hard-coded URL?
I will look into this thank you!

Eric

And what are they?

The hard coded URL they are referring to us the value you have set for ‘clicktag’ so you would need to remove that. You can remove both the JavaScript function you created and the duplicate JavaScript function you added to the ‘head html’ area in Hype.

https://support.google.com/admanager/answer/7046799?hl=en

Funny I removed all that then they came back to me that they needed the click-through option.
I am talking to them today and hopefully get some answers soon.

The vendor replied with code that replaces mine.
Not sure how to send that for review.
Question is, I can see the code in the email and to view the html I use Dreamweaver.
How do I translate that in Hype?
The HEAD HTML looks sparse compared to the actual page in Dreamweaver?
Do I just edit the exported html page?
Here is the html package via dropbox

I'm honestly a bit confused by what they sent you; it doesn't match the documentation and has some oddities like clickTag being defined as a function with illogical code, but clickTAG as a variable coming from the search parameter.

In general, the "DoubleClick Campaign Manager" export script should produce clickTag code that is compatible with Ad Manager.

I do see the example goes an extra step of wrapping the main content in an <a> tag. This generally isn't necessary but is not done by the export script. If that is a hard requirement let me know, as we could probably adapt and make a new export script to handle this. But I'm surprised it is required; generally you just need an exit somewhere which can be done via the export script's exit action as @daniel suggested.


Hype only allows editing the Head HTML via the Document Inspector. Any other edits must be made manually by editing the .html after export, or in an automated fashion via export script (this is how the DoubleClick Campaign Manager works).

Hype does provide the option of not saving the .html file at export, so that it won't blow away your changes should you manually modify it.

Yikes if you're confused can you imagine how I feel :slight_smile:
I did notice that tag when I was cross-ref old code to theirs.
They are also re-writing the other HTML project that has a carousel in it.
What I don't understand is the actual click-through part?
Remove the URL but keep the click mouse over code?
Where do viewers go when they click?
This whole thing got messy with their old Eye Return code.
Now they removed it but still want the click part working.

Thanks again for all your help on this.

Here is the reply I received in regards to the Carousel project:

They have wrapped the whole content with the click tag HREF; they need to make sure that the gallery navigation is not wrapped in the click tag wrap in the software they are using to build the html5

Carousel Hype attached:
option3_test.zip (289.1 KB)

I have no issues with this one other than the whole 970x250 pixel area becomes a mouse over option.
The nav buttons still work but not sure why the whole thing is a click tag.
Its only suppose to affect the orange section. I used a rectangle in Hype for mouseover.
So when clicking on the nav buttons that blank page pops up in a browser.
This is all so confusing.

The way their code is structured, it gets the clickTag via a search parameter in the URL.

Correct, this is the result of them wrapping in an <a href="..."> tag.

I would guess the problem is that you are using a hype document function dotheclick() to perform the exit. Functions defined in Hype are part of the data, and unfortunately automated ad validators tend to miss that this is being called, and maybe this was causing the failure?

The DoubleClick Campaign Manager export script itself puts the exit function in the head HTML, so it is more clearly called... I'm not sure if that was the problem hit, but you might want to try using that export script and see if that works. The key items would be:

  • Remove any existing clicktag code you have
  • Supply some URL in the Document Inspector's Export Script Arguments for clickTag
  • Set the mouse action to "Exit" instead of calling your own function
  • Then export via the new 'File > Export as HTML5 > DoubleClick DCM…' option

Maybe try submitting that and see if it works.

That said, it seems your original issue was that the clickTag had a hard-coded URL.... from my read on the documentation this should actually be okay, so maybe there's something else...

I removed the rectangle with the "dotheclick" function as well as cleaned up code.

I placed the clients target URL in the VALUE beside clikcTag KEY.

This is where I got lost. I tried a few things but don't know if that was correct.
Please explain.

When I use this option, the results are a mess.
No folder structure just files everywhere and the code is hard to read in Dreamweaver.
Please see attached Hype project as well as export from DCDCM.

Thanks again for helping with this.
Weird I cant seem to rename the zips.

option3_test clean.zip (289.7 KB)

option3_test clean.zip (252.4 KB)

The ad that you created/exported looks good to me. It passes the DCM Validator which generally means it would be okay.

So I suppose ultimately the question is, where does this requirement come from? Since the ad in this format looks good, I think it would be okay unless you are using a different ad system than Ad Manager?

You could modify it to still get the clickTAG variable from the search parameter, but this seems unnecessary given that google's documentation explicitly says it can automatically replace the embedded clicktag.

If you have more detailed requirements, please pass those on.

The export script embeds the Hype document loader and all animation data into the .html page. Is it a particular problem that this is the case?

Latest reply in regards to the last test export:

The script function hypeAdExit can't seem to work. We tried adding a DIV and no luck.
Either all of the banner becomes clickable or nothing ends up clickable.

I am going to ask them if they use Hype.
Crossing fingers.

That... is odd.. hypeAdExit() is about as simple as it gets:

	function hypeAdExit() {
		window.open(clickTag, "_blank");
	}

And it just references a clickTag definition from above in the code (which is set in the document inspector's export script arguments).

	var clickTag = "http://someurl.com";

What do they mean by "adding a DIV and no luck?" I'm really confused based on what you've said what their actual requirements are. If there's a spec and any validation please feel free to send it over and I can provide more guidance.

I am hoping I can explain this better.
The earlier uploaded file that you checked and passed requires a clickable area (orange section).
That's as far as I can get.
What's confusing to me is that it works if the whole graphic is a clickable area.
But in the CAROUSEL, we need the navigation buttons (whole left section) to be left alone.
They are going to attempt to recreate the CAROUSEL and add their code.
I offered to send them the HYPE file but no reply yet.
I don't know if they use HYPE.
Thanks again for all your help on this.
I have been dealing with this same vendor for a few years now and since then they have changed their services (coding) three times.
Thus why I keep coming back with the same type of issues.

Yeah, the code they sent you makes the whole ad clickable which won't work if you want inner regions to behave differently. It sounds like they need to work out if they are going to support interactive content in the ad, or just a single exit for the whole ad.

We're happy to hop on a call with them if you want to connect and can help them work out Hype's flow.

Thanks, Jonathan for the offer.
Here is the vendor's coding contact Khaled - khedroj@eyereturn.com
Please CC: Ian - isurage@eyereturn.com
They offered to rewrite the carousel banner ad to their code but liked the idea of you connecting with them first.
Thanks again!

1 Like

Thanks, I shot an email (CC'd you).

Thanks again hopefully there is light at the end of this one :slight_smile:

1 Like