The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

How do links within API-created Campaigns get tracked?

SOLVED
Go to solution
Highlighted
Occasional Participant

How do links within API-created Campaigns get tracked?

When uploading raw HTML as the email_content for a campaign how do my <a> links get converted for click tracking (prefaced by http://r20.rs6.net/tn.jsp)?

 

From using Preview & Test functionality, it doesn't seem like the URL's I provide are ready to be tracked as yet...

 

Will the click-tracking URL's generate when the email is sent, or should the be available in the preview? Is there something that I need to call or an attribute I need to supply for CTCT to generate these tracked-click throughs?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Participant

Re: How do links within API-created Campaigns get tracked?

Well, I figured it out after posting to support directly. Wrapping the <a> tags with <simpleurlproperty> worked.

 

Important: This is an advanced topic and requires previous HTML and XHTML knowledge.

Text links aren't automatically tracked in an email created with XHTML. Code must first be added for each link in your email draft.

To track image links in a custom XHTML template:

  1. Create an email using XHTML in the Advanced Editor.
  2. Click the "Advanced Editor" link on the lower left-hand side of the page.
  3. Click "HTML".
  4. Insert the following code structure for each text link:
    <SimpleURLProperty
    name="mylink"
    track="true"
    label="
    Link Text" href="
    http://www.samplewebsite.com">
    <a href="
    http://www.samplewebsite.com">Link Text</a>
    </SimpleURLProperty>
  5. Update the code in red with the URL for the website you want to link to.
  6. Click Save & Return to continue editing your campaign email.

Once you've added tracking to your image links, don't forget to add it to your image links too!

View solution in original post

2 REPLIES 2
Highlighted
Occasional Participant

Re: How do links within API-created Campaigns get tracked?

Note, I sent one of my API-created campaigns with links to localhost to see if they were somehow converted to tracked-links upon sending to no avail.

 

Please tell me if campaigns generated via API can leverage CTCT click tracking.

Highlighted
Occasional Participant

Re: How do links within API-created Campaigns get tracked?

Well, I figured it out after posting to support directly. Wrapping the <a> tags with <simpleurlproperty> worked.

 

Important: This is an advanced topic and requires previous HTML and XHTML knowledge.

Text links aren't automatically tracked in an email created with XHTML. Code must first be added for each link in your email draft.

To track image links in a custom XHTML template:

  1. Create an email using XHTML in the Advanced Editor.
  2. Click the "Advanced Editor" link on the lower left-hand side of the page.
  3. Click "HTML".
  4. Insert the following code structure for each text link:
    <SimpleURLProperty
    name="mylink"
    track="true"
    label="
    Link Text" href="
    http://www.samplewebsite.com">
    <a href="
    http://www.samplewebsite.com">Link Text</a>
    </SimpleURLProperty>
  5. Update the code in red with the URL for the website you want to link to.
  6. Click Save & Return to continue editing your campaign email.

Once you've added tracking to your image links, don't forget to add it to your image links too!

View solution in original post

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured