share
RecommendedUse this event when a user has shared content.
- Platforms
- web, app
- When it fires
- You send it when the action happens.
Parameters (3)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| method | string | No | The method in which the content is shared. | |
| content_type | string | No | The type of shared content. | image |
| item_id | string | No | The ID of the shared content. | C_12345 |
Example
gtag.js
gtag('event', 'share', {
method: 'Twitter',
content_type: 'image',
item_id: 'C_12345',
});GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'share',
method: 'Twitter',
content_type: 'image',
item_id: 'C_12345',
});