Install
Add the website tag
Copy your EzyPromote website tag, paste it on your site builder or framework, set cookie consent and check that clicks arrive.
What the tag does
The website tag is a short script that goes inside the <head> of every page. When a visitor arrives through an affiliate link, it records the click and keeps it in a cookie on your own domain. When the visitor signs up or buys later, EzyPromote uses that click to credit the right affiliate.
The tag holds two publishable keys: a live key (pk_live_…) and a test key (pk_test_…). Publishable keys only identify your program, so they are safe to show on every page.
Copy your tag
- Open Setup and go to step 2, Install tracking.
- Choose Paste it myself and copy the tag with the copy button. Or choose With an AI assistant and copy the prompt instead: your AI adds the tag for you. See Install with an AI assistant.
Rather do it on your server? Developers can record clicks in middleware with EzyPromote’s server SDK, as well as or instead of the tag: see Track clicks and signups on your server. Keep the tag if you sell through Stripe payment links.
Settings → Tracking and payments has the same tag under Clicks, in Get your website tag, with two extra settings most sites don’t need: Where your site is built, for platform-specific steps, and Cookie consent, explained below.
Your tag looks like this, with your own values:
<script
src="https://api.ezypromote.com/ep/VERSION/ep.js"
integrity="sha384-COPY_IT_FROM_THE_APP"
crossorigin="anonymous"
data-key="pk_live_YOUR_KEY"
data-test-key="pk_test_YOUR_KEY"
data-api="https://api.ezypromote.com"
data-cookie-days="60"
async
></script>
Copy the tag from the app instead of typing it. The
integrityvalue pins the exact version of the script, and a browser refuses to run it if thesrc,integrityorcrossoriginvalues change.
Where to paste it
Every platform ends the same way: publish your site, then go back to EzyPromote and choose Check my site.
Any website (HTML)
- Paste the tag inside
<head>on every page. A shared header or layout file covers every page at once. - Publish your changes.
Google Tag Manager
- In Tag Manager, open your container and choose Tags, then New.
- Name the tag EzyPromote. Choose Tag configuration, then Custom HTML, and paste your tag.
- Choose Triggering, then All Pages.
- If you chose Google Consent Mode: under Advanced settings, open Consent settings and choose No additional consent required. The tag reads your banner’s choice itself.
- Choose Save, then Submit, then Publish.
Paste the Tag Manager version of your tag: choose Google Tag Manager under Where your site is built, or the Google Tag Manager tab above your tag during setup. It has no integrity hash, because Tag Manager refuses one with “Invalid HTML”. If your site sends a Content-Security-Policy, it must still allow EzyPromote (see the troubleshooting table below).
Next.js
- Open
app/layout.tsx. - Paste the tag inside
<head>. Add a<head>if the file has none. - Deploy your site.
Using the pages folder? Paste it inside <Head> in pages/_document.tsx. When you choose Next.js, the app writes crossOrigin the way React expects.
Astro
- Open the layout your pages share, often
src/layouts/Layout.astro. - Paste the tag inside
<head>. The app addsis:inlinefor you. - Deploy your site.
TanStack Start
- Open
src/routes/__root.tsx. - Paste the tag inside
<head>, after<HeadContent />. - Deploy your site.
Webflow
- In Webflow, open Site settings, then Custom code.
- Paste the tag into Head code and choose Save changes.
- Publish your site.
Custom code needs a paid Webflow site plan.
Wix
- In Wix, open Settings, then Custom code under Advanced.
- Choose Add Custom Code and paste the tag. Set Add code to pages to All pages and Place code in to Head, then choose Apply.
This needs a Wix premium plan and a connected domain.
Squarespace
- In Squarespace, search the menu for Code injection and open it.
- Paste the tag into Header and choose Save.
Code injection needs a Squarespace plan that includes it.
Framer
- In Framer, open Site settings, then General, then Custom code.
- Paste the tag into End of
<head>tag and choose Save. - Publish your site.
WordPress
- Install the free WPCode plugin, or use your theme’s header code box if it has one.
- In WPCode, open Code Snippets, then Header & Footer. Paste the tag into Header and choose Save Changes.
- If you use a caching plugin, clear its cache.
Cookie consent
Most sites can skip this: by default the tag records clicks straight away. If your cookie banner must block tracking until a visitor agrees, set Cookie consent in Settings → Tracking and payments under Get your website tag, then copy the tag again.
The tag stores clicks in a first-party cookie, so it can follow your cookie banner.
| Option | What it means |
|---|---|
| No consent banner | The tag records clicks and sets its cookie straight away. |
| Wait for my banner | The tag stores nothing until your banner calls ep('consent', 'granted'). |
| Google Consent Mode | The tag follows the ad_storage choice your banner already sends to Google. Nothing else to wire up. |
With Wait for my banner, the app also shows this code. Add it to your page and run the last line when the visitor agrees:
<script>
window.ep =
window.ep ||
function () {
;(ep.q = ep.q || []).push(arguments)
}
// From your consent banner, when the visitor agrees:
ep('consent', 'granted')
</script>
In Google Tag Manager, put this code in a second Custom HTML tag and fire it on the event your banner sends when the visitor agrees.
When a visitor declines, the visit is counted without any cookie, and that visitor can’t earn an affiliate a commission.
Sites on several domains
Cookies don’t cross domains. If visitors land on yourstore.com and sign up on app.yourproduct.io, the click would be lost. The tag fixes this with link decoration: when a visitor follows a link to another of your domains, the tag adds their click to the link (?ep_click=…), and the tag on the other site stores it.
EzyPromote builds the list of your domains from your website, your product pages, each campaign’s “Where links go”, and Your site’s domains. Subdomains are covered: yourstore.com includes shop.yourstore.com. The tag only records clicks from domains on this list.
To add a domain:
- Open Settings → Tracking and payments.
- Under Your site’s domains, type the domain in Add a domain and choose Add domain. You can list up to 20.
- Copy the tag again and paste it on every site.
Product pages
If you sell more than one product, the app lists a data-product attribute for each product under your tag, such as data-product="pro". Add it to the tag on that product’s pages, so clicks there count for that product. Send the same product slug with your payments as ep_product. See Match payments to affiliates. With one product, skip this.
Check your install
- Choose Check my site. EzyPromote opens up to 5 of your pages and checks the tag, its keys, its version and your site’s security policy.
- Choose Open my test link. It opens your site through your test link, your website with
?via=testat the end, such ashttps://yourstore.com/?via=test. - Wait for “Test click received”. EzyPromote waits up to 10 minutes.
Use a normal browser window with ad blockers off. The test link belongs to your test affiliate and records test data only.
Troubleshooting
If no click arrives, open Not seeing clicks? in the app. The most common causes:
| What you see | What to do |
|---|---|
| Tag not found | Paste the tag inside <head> on every page, then publish your site. |
| Tag not published in Tag Manager | Open Tag Manager, choose Submit, then Publish. |
| Your site blocks automated checks (Cloudflare) | Open your test link once: EzyPromote confirms the tag from real visits. Or allow the user agent EzyPromoteSiteCheck in your firewall. |
| Your browser will refuse to run the tag | The tag was changed after copying. Copy it again without edits. |
| Your site’s security policy blocks the tag | Add the EzyPromote address from your tag’s src (for example https://api.ezypromote.com) to script-src and connect-src in your Content-Security-Policy. |
| Your tag is waiting for cookie consent | Accept cookies in your banner when you open the test link. |
| No click reached EzyPromote | Turn off ad blockers or use another browser. Visitors who block tracking aren’t counted. |
| Your test click came from another site | Affiliate links go to your website. Put the tag there, or add the other domain under Your site’s domains. |
| Your tag doesn’t list all your sites | Copy the tag again and paste it on each site. |
| Your tag is version … | Copy the new tag. The old one keeps working without the newer features. |
Next: Connect Stripe.