share Event

The share event is used to track when a user shares content or products with others — through social platforms, copy link buttons, or embedded sharing tools. This is useful for understanding referral behaviors and social engagement.

The share model

This model captures details about what was shared and how.

Properties

  • Name
    event
    Type
    string
    Description

    Must be set to share.

  • Name
    user_id
    Type
    string
    Description

    Unique identifier for the user performing the share.

  • Name
    session_id
    Type
    string
    Description

    Current session ID.

  • Name
    content_type
    Type
    string
    Description

    The type of content being shared (e.g., product, article).

  • Name
    content_id
    Type
    string
    Description

    ID of the shared content.

  • Name
    method
    Type
    string
    Description

    Sharing method used (e.g., facebook, twitter, copy_link).


Push event to the dataLayer

dataLayer.push example

dataLayer.push({
  event: 'share',
  user_id: 'user-777',
  session_id: 'session-999',
  content_type: 'product',
  content_id: 'SKU-9999',
  method: 'copy_link'
});

Best Practices

  • Push the event only after the share action is confirmed (not on click alone).
  • Normalize share methods to ensure consistent reporting.
  • Combine this data with referral and UTM tracking to measure downstream impact.

Use Cases

The share event supports:

  • Social engagement analytics
  • Measuring viral or word-of-mouth activity
  • UGC campaign performance
  • Referral-driven conversion analysis

Was this page helpful?