HTML & Static Sites Installation Guide

Install the Discover Mac Apps affiliate tracking script on HTML, Webflow, Framer, Hugo, Jekyll, or Astro websites with a single lightweight tag.

If you are using a static site generator (Jekyll, Hugo, Astro), a platform like Webflow/Framer, or just plain old HTML files, installation is incredibly simple.

The Tracking Snippet

Copy the following snippet and paste it right before the closing </head> tag on every page of your website (or in your global head template).

<!-- Discover Mac Apps Tracker -->
<script 
    src="https://discovermacapps.com/track.js" 
    data-program-id="YOUR_PROGRAM_ID" 
    defer
></script>

[!IMPORTANT] Make sure to replace YOUR_PROGRAM_ID with the actual Program ID found in your dashboard.

Using defer

Notice the defer attribute on the script tag. This is important for performance. It tells the browser to continue downloading and rendering your HTML content without waiting for our script to finish downloading. Once your HTML is fully parsed, our script executes.

Cross-Domain Tracking

If your marketing site is on www.myapp.com and your checkout happens on app.myapp.com, cookies set on the www subdomain might not be readable on the app subdomain.

To fix this, our script automatically attempts to set the cookie on the root domain (.myapp.com). However, if you are passing users to an entirely different domain, see our Cross-Domain Tracking guide in the tracking section.

Was this article helpful?
Still need help? Contact Support