Josiah Kaiser
posted this on October 28, 2009 05:40 pm
This article offers specific instructions on how to embed a ShareThis Social Forward icon into a custom template. Understanding of HTML, Social Forward, and AMPScript is advised.
Step 1: Declaring a Social Region
The first thing we need to do is define the region that is going to be shared via the Social Forward utility. In this case, we will be defining the entire body of the email, excluding the header and the footer. To do this we need to insert the following code right after the <body> tag in the html code. There are three variables that we will need to define, they are all encased in double quotes(" "):
The following is the format the code should take:
<body>
<!-- RegionStart[ socialslot:"RegionName", title:"RegionTitle", description:"Brief Description"] -->
The code to close a content region is even simpler. The only field that needs defined is RegionName. This content will be inserted right before the closing </body> tag and takes the following form:
<!-- RegionEnd[ socialslot:"RegionName"] -->
Step 2: Inserting the Social Icon
This require insertion a block of code where the Social Forward link and image should appear. The images used as the individual social icons are located in the "Social" folder in you "Portfolio" with you account. Simply view the properties or double click the needed icon to find its URL. You will also need to define the social network that is being shared to by number. The following tables shows that available social networks or sharing services and their numerical identifier.
| Social Network |
Numerical Identifier |
|---|---|
| 1 | |
| Delicious | 2 |
| Digg | 3 |
| MySpace | 4 |
| StumbleUpon | 5 |
| 6 | |
| Microsoft | 7 |
| Yahoo | 8 |
| 9 | |
| ShareThis | 10 |
| 11 |
In the following code, we will be using "10" to indicate we are sharing to the ShareThis network which will then allow the person sharing the content to choose which networks to post across.
<!-- Creates a link to share this content on ShareThis -->
<a href="%%=GetSocialPublishURL('10','RegionName')=%%"
alias="LinkAlias"
title="LinkTitle">
<img
src="Image URL"
alt="ShareThis"
title="ShareThis"
border="0">
</a>
That's It
Once you complete those two steps, you are finished. That's it. Of course, before using this feature in the wild, TEST TEST TEST.
~Josiah