In the past (2015) worldwide mobile data traffic added to 3.7 exabytes/month, but by 2020 it is expected to reach 30.6 exabytes/month globally.
People are sharing stuffs with each other easily and frenzily, with the help of Social networking share buttons. Fast rendering, mobile friendly Accelerated Mobile Pages (AMP) are all craze now.
Since WhatsApp has witnessed the rise in its popularity as the most popular communicator, it is important for Bloggers to tap the potential of WhatsApp to improve their mobile traffic. Let us implement AMP Whatsapp share button in this tutorial.
Step 1: The amp-social-share component will have to be added in the header.
<script async='async' src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js" custom-element="amp-social-share" ></script>Step 2: Add a Layout gadget element and introduce this code.
<b:if cond='data:blog.isMobileRequest == "true"'>Step 3: You'll get a whatsapp share button like this visible when the page is viewed through mobile -
<amp-social-share data-share-endpoint="whatsapp://send" expr:data-param-text=""Check out - " + data:blog.canonicalUrl" layout="container" type="whatsapp">
<amp-img alt="Share via Whatsapp" height="45" layout="fixed" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfuIcqTmzkAneRU4i-poRGwGBhvZGUBok3hGhhLe6d1EMXy2ll0u6G4t370WH7rDuq__7p2OGCLWYr-vUi1bxETfqtFpww6NLu0311hJ8CZWJk1eawUCK2saC9ln7dZN6BQVn2U6Uhyphenhyphen5n8/s1600/whatsapp-256.png" width="45">
</amp-img></amp-social-share>
</b:if>
Disqus comments