Code Snippets

Code Snippets are very important when sending an email through ClickDimensions. We provide two code snippets:

  • Unsubscribe: Inserts a global unsubscribe link in your email.
  • Microsite / HTML Version: Inserts a link that opens the email in a browser window.

You can insert the Code Snippets using the drop down arrow on the Code Snippet button in the top toolbar.

freestyle button

Or, if you’re using the Block Editor, you can use the Unsubscribe and Microsite blocks which will stay at the bottom and the top respectively by clicking on the Page button.

block button

If your readers are not able to view the email in their email client, they can open the email in a browser window by clicking the link provided by the Microsite / HTML Version code snippet.

microsite-link

The Unsubscribe code snippet provides the link that allows the recipient to unsubscribe from all emails sent through ClickDimensions.

Unsubscribe Snippet

If you right click on the link in the snippet and choose Properties, you’ll notice that the URL is actually a script, ${Gears.unsubscribe()}. [It says ${Gears.microsite()} for the Microsite / HTML version.]

hyperlink manager

If you need to move the snippets around in your template, make sure that you do not copy or cut and paste. That will ruin the URL script. Just delete and reinsert the script.

In this dialog, you can also change the link text to something other than “here” if you’d like. The rest of the text in the snippet is just normal text, so you can edit that to say whatever you’d like it to say.

When someone clicks on the Unsubscribe snippet in an email they are universally unsubscribed from all emails sent by you through ClickDimensions. To find out more about what happens when they click the link check this out.


You can insert the Code Snippets using the drop down arrow on the Code Snippet button in the top toolbar.

Code Snippet Button

Or, if you’re using the Block Editor, you can use the Unsubscribe and Microsite blocks which will stay at the bottom and the top respectively by clicking on the Page button.

If your readers are not able to view the email in their email client, they can open the email in a browser window by clicking the link provided by the Microsite / HTML Version code snippet.

HTML Version Snippet

The Unsubscribe code snippet provides the link that allows the recipient to unsubscribe from all emails sent through ClickDimensions.

Unsubscribe Snippet

If you right click on the link in the snippet and choose Properties, you’ll notice that the URL is actually a script, ${Gears.unsubscribe()}. [It says ${Gears.microsite()} for the Microsite / HTML version.]

Snippet Hyperlink

If you need to move the snippets around in your template, make sure that you do not copy or cut and paste. That will ruin the URL script. Just delete and reinsert the script.

In this dialog, you can also change the link text to something other than “here” if you’d like. The rest of the text in the snippet is just normal text, so you can edit that to say whatever you’d like it to say.

When someone clicks on the Unsubscribe snippet in an email they are universally unsubscribed from all emails sent by you through ClickDimensions. To find out more about what happens when they click the link check this out.

Note: If you have the Standard ClickDimensions package or higher, you also have access to Subscription Lists. Subscription Lists allow you to give options for different lists for users to opt-in or out of rather than universally unsubscribing from all emails.

You must have either the unsubscribe link or the Subscription Preferences Link in your email if you are sending it to more than 500 people.


Feature Added: 2011
Feature Updated: Any
ClickDimensions Version Need: Any