Template Variables

Better Sharing offers several template variables with fallbacks that can be overridden.

  • greeting – Used as the salutation in Email Templates. Can be overridden. Defaults to “there” when recipient’s first name is not available.
  • referral_link – The link that will be shared. Can be overridden.
  • sender_custom_message – A placeholder in an Email Template for a custom message to be written by the sender. Cannot be overridden.
  • sender_first_name – The sender’s first name. Can be overridden. Defaults to “your friend” when the sender’s first name is not available.
  • email_message – The message in Email Templates. Can be overridden. Fallback can be specified in UI Templates.
  • x_message – The pre-loaded message in X posts. Can be overridden. Fallback can be specified in UI Templates.

The fallbacks and defaults can be overridden in two ways.

  1. With an itemprop meta tag on the page.
  2. With shortcode attributes.

For the itemprop meta tags, a bswp_ prefix must be added to the property name or attribute name in order to correctly identify the template variable to be overridden.

Meta tag example:
<meta itemprop="bswp_email_message" content="This gizmo is on sale for only $9.99!" />

Shortcode attribute example:
[better-sharing id=1 email_message="This gizmo is on sale for only $9.99!"]

 

Try CloudSponge for free in your
testing environment

Get Started

Have a questions or prefer a guided tour?
Schedule a consultation with our Founder.