How will this email be sent?
SFMC already tracks clicks. This step gives every link its own alias and an hm_id number, so the same URL used in three places shows as three separate spots on the heatmap.
Paste the full HTML of the email (from Content Builder or your template).
What you need
Links ranked by clicks
Which setup do I need?
| How you send | Click tracking | What to do |
|---|---|---|
| SFMC sends the email (any inbox, Outlook included) | Built in | Tag in "Sent from SFMC" mode, send as normal, then export clicks with the SQL below (option A). |
| Designed in SFMC, pasted into Outlook and sent from Outlook | None by default | Set up the CloudPage tracker once (option B), then tag each email in "Sent from Outlook" mode. |
Option A: SFMC sends
- Tag the email in Sent from SFMC mode and paste the tagged HTML into Content Builder.
- Send as usual. Note the Job ID from Tracking (Email Studio, Tracking, Sends).
- Create a data extension called
HM_ClickSummarywith these fields:Field Type Length LinkName Text 500 LinkContent Text 4000 Clicks Number UniqueClicks Number - In Automation Studio, add a SQL Query activity with the query below (change the Job ID), target
HM_ClickSummary, data action Overwrite, and run it. - Open the data extension's records, copy the rows (or export them as CSV) and paste them into the Report tab with the tagged HTML.
The _Click data view keeps about six months of history. Untagged emails also work: the report then matches clicks by URL, but repeated URLs can't be told apart.
Option B: Outlook sends (CloudPage tracker)
- Create a data extension called
HM_Events(use the same text for Name and External Key):Make every field nullable except EventType, and do not set a primary key.Field Type Length Notes EventType Text 1 c = click, o = open EmailID Text 100 LinkID Text 50 hm01, hm02 ... URL Text 1000 Recipient Text 254 optional, nullable UserAgent Text 500 used for device and bot checks EventDate Date default value: Current date - Upload a 1x1 transparent GIF to Content Builder and copy its URL (only needed for open tracking).
- Create a CloudPage (landing page), switch to code view, paste the code below, and edit the settings at the top: your allowed domains, your fallback page and the GIF URL. Publish it and copy its URL.
- Tag each email in Sent from Outlook mode using that URL and a short Email ID, then paste the tagged HTML into Outlook.
- Send yourself a test, click a link, and check that a row lands in
HM_Events. - For the report, copy the rows for your Email ID (or export as CSV) and paste them in. Raw rows are best, because they include the user agent for device and bot checks.
Optional: summarise a large send
If there are too many rows to copy, run this query into a data extension with fields EventType, LinkID, Clicks, UniqueClicks. You lose the device and bot checks, so use raw rows when you can.
Good to know
- No scroll tracking in email. Inboxes block scripts, so no tool can see scrolling. The report shows click depth instead: how clicks split across the top, middle and bottom of the email.
- Security scanners click links. Company and school mail filters often open every link before the person sees the email. In Outlook mode the report removes clicks with bot-like user agents and bursts of 3 or more different links within 3 seconds. SFMC's _Click view has no user agent, so expect some noise there on internal sends.
- Opens are rough. Apple Mail preloads images (inflating opens) and Outlook often blocks images (hiding opens). Trust clicks more than opens.
- Outlook buttons. The tagger gives an Outlook VML button the same ID as its normal button, so both count as one spot.
- Unique clicks in Outlook mode need a recipient value. A single Outlook send to a list uses the same links for everyone, so you get total clicks only.
- CloudPage usage. Page views on CloudPages can count towards your SFMC Super Messages, depending on your contract. Worth a quick check before a big send.
- Your data stays with you. The email HTML and click rows you paste are processed in this browser tab and are not sent anywhere. When "Load the email's online images" is on, the preview fetches those images from wherever they are hosted, the same way an inbox would.