Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Creating a clickTag in Adobe Animate

Explorer ,
Apr 15, 2025 Apr 15, 2025

Hey everyone. This seems to be a monumentally PIA that has been asked a bunch over the years, but I can't seem to get a straight answer. 

How do I add a clickTag to a single button in Adobe Animate? This button/layer is a graphic from an imported Adobe Illustrator stage.

I've seen the option to go in and edit the HTML manually after the fact but that seems to wrap the entire creative in a clickTag. I just want the button to accurately have a clickTag on it. 


288
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Apr 16, 2025 Apr 16, 2025

You seem to have it correct there except you may need to move that line, the "clickBtn.addEventListener" one, into the frame where the button exists rather than in the Global Scripts.
Keep the "var clickTag" line in the Global Scripts though.

Translate
Community Expert ,
Apr 16, 2025 Apr 16, 2025

Instead of a graphic, make it a button and add the clicktag with the Actions wizard

(you may need to edit this in the HTML later if you want to make it Google compliant). 

https://www.youtube.com/watch?v=pjajID8WvbI

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

Yeah unfortunately that's not a "clickTag" setting as defined by Google. clickTags let you edit the variable after the fact via Google Ad Manager 360 - this method does not do that. 

It might just not be possible in Animate natively as it's just an HTML file encapsulating a JS file. So manually editing it (or at least making a publishing template) might be the only way.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2025 Apr 16, 2025

Yes, you need to manually edit the html and add a clicktag variable after the fact per Google's HTML5 guidelines:

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

But the point is that with this method (and by adding the clicktag variable), the click area of the creative is limited to the button's dimensions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

It's not though. Because using the manually edit method does *not* allow you to define the clickTag to just the button when exporting from Animate.

You may say "yes, it does - look at Google's example. The 'a href' points to the button as the clickTag source!"

But, alas, no! Because the HTML file coming from Animate only points to the .JS file, you can not actually point the "a href" to an individual element *within* that JavaScript file. The best you can do  is wrap the whole creative in the clickTag. Which, technically works... it's just not ideal execution.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 16, 2025 Apr 16, 2025

No wonder, this has been troubling you. Why would you be creating an anchor tag that links to a button on the canvas?
Create the button and use the code snippet, the one that says "Click to go to Web Page", and put "clickTag" in there.
And make sure to declare the clickTag variable in the head like the Google example or better yet declare it in Global Scripts.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

Oh that part hasn't really been troubling me. In the sense that modifying the HTML after publishing was only a recent "solution" that I stumbled upon (and that Mario mentioned) and I was just pointing out *why* that doesn't work. I actually haven't been really trying that.

But I think you're leading me on the right path. My first effort from googling hade me do this.

First make the button a button (of course) and name it clickBtn.

Then add the code below to Global Scripts:

var clickTag = "https://www.curi.com"; // Destination URL

clickBtn.addEventListener("click", function() {
    window.open(window.clickTag, "_blank");
});

 

"clickBtn" on the button refrenced in the code above.

This lets the published ad pass the HTML5 validity check but the button isn't actually doing anything. 

That's where your solution comes in. I had *not* been using the "Click to go to web page" code snippet on the button. I'll do that. However when you say to "put 'clickTag' in there." What does that mean exactly? I can edit code, but not a coder so not sure where that goes exactly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

Unreal, can you not edit posts? I need to edit out that URL, but there does not appear to be a way to edit or delete posts. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 16, 2025 Apr 16, 2025

You seem to have it correct there except you may need to move that line, the "clickBtn.addEventListener" one, into the frame where the button exists rather than in the Global Scripts.
Keep the "var clickTag" line in the Global Scripts though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

Awesome, I'll try that thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 16, 2025 Apr 16, 2025

Woo, ok I think this is going to work! Thanks! I have to pass it to the media buyer to actually upload and test to make double sure the URL is injectable va Ad Manager 360, but the code all looks correct now and seems to work. 

Thanks a ton!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 23, 2025 Apr 23, 2025

Hi Zach, would be great to know if you were successful with this!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 23, 2025 Apr 23, 2025

Hey Tom, yup we got it to work. I'm phone posting but in the morning I'll make sure to post exactly what we did.

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 24, 2025 Apr 24, 2025
LATEST

Ok so to give a bit more clarity to the final answer:

  • In the Actions window - on the "Global>Script" pane you want to define the clickTag variable by putting this code:
var clickTag = "https://www.example.com"; // Destination URL​
  • Then:
    • Go to frame 1
    • select the button
      • name the button clickBtn (or it can be whatever, just needs to be reflected in the code below)
      • select "Button" category from the dropdown menu in properties>object (see screenshot below)
    • paste the following code on the button - once you select the button and paste the code in the actions window, it'll automaticallyh add a "Scene 1>button" field in the Actions panel (see screenshot below)
this.clickBtn.addEventListener("click", function() {
window.open(window.clickTag, "_blank");
});

 

And that should be it! Example images attached

 

clickTag_3.jpgexpand image

clickTag_1.jpgexpand imageclickTag_2.jpgexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines