[SalesForce] Using Marketing Cloud Social Share / FTAF feature but manipulating content

The out of the box solutions for Social Sharing and FTAF allows you to share specific content within the email, the problem that I am facing is that we append specific tracking parameters to our URL's that differ by usage for example we have email specific tracking codes that identify users who click when they receive the email and click within the email.

Now, when they are leveraging social share I would want the url query parameter to change to reflect that the traffic is actually coming from an email but was shared via the social share function.

Example:

The regular email would have a url querystring like so:
http://domain.com?tracking=123&referrer=email

But when they leverage social share or even FTAF I want the exact same content to be shared but need to change parameters like so:

http://domain.com?tracking=456&referrer=socialshare

Best Answer

You can use the MessageContext AMPScript function to create a "referer" variable.

Example:

%%[
if _MessageContext == "VAWP" then
set @referrer = "ViewAsWebpage"
elseif _MessageContext == "Social" then
set @referrer = "Social"
elseif_MessageContext == "FTAF" then
set @referrer = "ForwardToaFriend"
endif
]%%

then in your link you can put:

http://domain.com?tracking=456&referrer=%%=v(@referrer)=%%

Sources: http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/how_to_use_ampscript_to_contextually_display_send_time_content/

http://help.exacttarget.com/en/documentation/exacttarget/content/personalization_strings/

Related Topic