How to Update the clickTag in an HTML5 Zip Bundle

Created by Caleb Williams, Modified on Fri, 3 Jul at 3:46 PM by Caleb Williams

A quick-reference guide for Campaign Managers

What Is a clickTag?

The clickTag is a JavaScript variable inside the ad's HTML file that tells ad servers (like GAM) where to send users when they click the ad. Ad servers dynamically insert the destination URL into this variable — that's why it needs to be present and correctly named.

Step-by-Step Instructions

Step 1: Unzip the file

  • Right-click the HTML5 ad zip → Extract All (Windows) or double-click (Mac)
  • You'll get a folder with an index.html file (sometimes named differently — check for a file that opens in a browser and shows the ad)

Step 2: Open index.html in a text editor

  • Right-click → Open With → Notepad, TextEdit, VS Code, or Sublime Text
  • Do NOT open with Word — it will corrupt the formatting

Step 3: Search for "clickTag"

  • Use Ctrl+F (Windows) or Cmd+F (Mac) to search the file for clickTag
  • It usually looks something like one of these:

var clickTag = "https://example.com";

window.clickTag = "https://example.com";

Step 4: Check what you find

If clickTag exists: Replace only the URL inside the quotes with the correct destination URL. Leave everything else untouched.

var clickTag = "https://your-new-destination-url.com";

If clickTag does NOT exist: The creative wasn't built correctly. Don't try to add it yourself — send it back to the creative agency/designer and ask them to implement a standard clickTag variable, since it also needs a click handler wired to it (e.g. on the ad's container onclick).

Step 5: Confirm the URL format

  • Must start with http:// or https://
  • No typos, no trailing spaces inside the quotes
  • Use the exact tracking/landing URL provided by the client or media buy brief (including any tracking parameters)

Step 6: Save the file

  • Save as plain text, keep the .html extension — don't let the editor add .txt

Step 7: Re-zip the folder

  • Select all files inside the folder (not the folder itself) → right-click → Compress/Send to → Zip
  • The index.html must be at the root of the zip, not nested inside a subfolder — this is the #1 cause of ads failing to trigger. If you zip the parent folder instead of its contents, GAM will fail.

Step 8: Test before trafficking

  • Upload to GAM as a test creative, or open index.html locally and click the ad — it should attempt to open the URL you set
  • Double check the click actually fires and lands on the correct page

Quick Troubleshooting

Issue

Likely Cause

Ad doesn't click through

clickTag missing, or click handler not tied to it

GAM rejects the upload

index.html not at root of zip

Click goes to wrong URL

Old URL not fully replaced, or wrong variable edited

Ad displays but click does nothing

JS error elsewhere in file — check syntax near your edit didn't break a comma/quote

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article