extensions/amp-addthis/amp-addthis.md
The amp-addthis component provides integration of
AddThis share buttons in AMP pages. Website visitors use AddThis share buttons to share content to over 200 social channels including Messenger, WhatsApp, Facebook, Twitter, Pinterest and more.
Placed on the sides, top, or bottom of your page, following your reader as they scroll. A great way to promote sharing without getting too in-your-face.
Example:
<!--
This example uses a placeholder pubId.
Please replace the pubId value with your own after
creating an account on https://www.addthis.com/dashboard.
-->
<amp-addthis
width="320"
height="92"
layout="responsive"
data-pub-id="ra-5c191331410932ff"
data-widget-id="957l"
data-widget-type="floating"
>
</amp-addthis>
Integrate share buttons into your content for a seamless sharing experience.
Example:
<!--
This example uses a placeholder pubId.
Please replace the pubId value with your own after
creating an account on https://www.addthis.com/dashboard.
-->
<amp-addthis
width="320"
height="92"
data-pub-id="ra-5c191331410932ff"
data-widget-id="mv93"
data-widget-type="inline"
>
</amp-addthis>
And that’s it! You should see the share buttons appearing on your page!
Check out our YouTube video for step-by-step instructions: <amp-youtube data-videoid="BSkuAB4er2o" layout="responsive" width="480" height="270"></amp-youtube>
The AddThis Tools and AddThis Toolbar collect information from the device used by the End User to interact with Publisher Sites or by the Toolbar User to interact with the AddThis Toolbar (“AddThis Data”). Read the full AddThis Privacy Policy.
AddThis Data may consist of the following:
AddThis Data will be treated as personal information to the extent required under applicable law. Publishers are required per the AddThis Terms of Service to obtain all necessary End User consents and authorizations, and provide any required notices for the provision of AddThis Data collected from End Users to Oracle.
If you have any questions or need any help in implementing AddThis on AMP, please contact our fabulous support team by submitting a ticket here or by emailing [email protected].
The AddThis publisher ID found in the URL in the AddThis dashboard after logging in. For example, in the URL https://www.addthis.com/dashboard#gallery/pub/ra-5c191331410932ff, ra-5c191331410932ff is the publisher ID.
The AddThis widget ID for the tool to be displayed, also found on the AddThis dashboard. The widget Id for a specific tool can be found by opening that tool in the AddThis dashboard and copying the last part of the URL. For example, in the URL https://www.addthis.com/dashboard#tool-config/pub/ra-5c191331410932ff/widgetId/957l, 957l is the widget Id.
Attribute that describes the type of widget.
data-widget-type="floating"data-widget-type="inline"Optional. If set, this is the title that the AddThis tool will attempt to share when sharing occurs. If not set, the title of the document containing the amp-addthis tag will be used.
Optional. If set, this is the URL that the AddThis tool will attempt to share when sharing occurs. If not set, the location.href property of the document containing the amp-addthis tag will be used.
Optional. If set, this is an URL for a piece of media (e.g., image or video) that the AddThis tool will attempt to share when sharing occurs. If not set, this is left undefined.
Optional. If set, this is the description of the page that the AddThis tool will attempt to share when sharing occurs. If not set, this is left undefined.
See amp-addthis rules in the AMP validator specification.