IN THIS ARTICLE
The following tutorial will help you install Shareaholic on Simplero:
If you have not already signed up for Shareaholic, check out the Getting Started with Shareaholic Guide before following the instructions below.
Install Shareaholic Setup Code (Shareaholic.js)
- Log into your Simplero account.
- Under Settings, click on Tracking:
- Paste your site's Shareaholic setup HTML code into the box titled Global Tracking Code:
Your site's Shareaholic setup code can be found under Site Settings -> Installation tab on Shareaholic.com: - Congratulations - Shareaholic is now installed on your website!
Install Shareaholic Content Meta Tags (more info)
The following adds author name, article published at timestamp, and keywords Shareaholic meta tag to your Blog pages. It also marks non-article pages (for example your blog index page) to be not recommendable.
<!-- Shareaholic Content Tags -->
{% if post.poster.name != blank %}
<meta name='shareaholic:article_author_name' content='{{ post.poster.name }}' />
{% endif %}
{% if post.published_at != blank %}
<meta name='shareaholic:article_published_time' content='{{ post.published_at | date: "%Y-%m-%dT%H:%M:%S" }}' />
{% endif %}
<meta name='shareaholic:keywords' content='type:{{ meta_data.type }}' />
<meta name='shareaholic:keywords' content='type:blog' />
{% if meta_data.type != "article" %}
<meta name='shareaholic:article_visibility' content='private' />
{% endif %}
{% if post.categories != empty %}
{% for category in post.categories %}
<meta name='shareaholic:keywords' content='cat:{{ category.label | downcase }}' />
{% endfor %}
{% endif %}
<!-- Shareaholic Content Tags -->
In this example, we added the above code to the "blog_post_meta.liquid" file of the theme (located under Snippets):
To edit your Simplero theme:
- Under Settings, click on Themes:
- Click on Customize theme -> Edit code
How-to install an In-page Shareaholic App
Shareaholic In-page Apps are special apps that let you place them exactly where you want in your website layout or template at the location where the app should be displayed. In-Page Share Buttons, In-Page Related Content and In-Page Follow Buttons are examples of Shareaholic In-Page apps.
If you have not created an In-page Shareaholic App, check out the Installing an In-page Shareaholic App Guide before following the instructions below.
To add an In-page Shareaholic App in your template:
- Click on Edit template for the page type:
- Add a new Section:
- Select type Text:
- Click on the Source Code icon:
- Enter Shareaholic's In-page app code here:
Alternatively, instead of adding a section of type Text, you can also add a section of type Script and enter Shareaholic's In-page app code here. It says "JavaScript" but it's fine to add HTML as well: - Save your changes and you're done! The In-page apps that you've added to the template will now render on the page: