Skip to main content

Using URL Query Parameters

URL query parameters offer a powerful way to pass essential user and group information directly through your URLs. This facilitates user and group identification by Dreamdata Analytics, enhancing tracking accuracy across websites or within email campaigns.

Supported Query Parameters

Dreamdata recognizes specific query parameters to perform identify, group, and track events automatically. These parameters can also be combined. Here is a reference table of supported parameters, followed by detailed usage examples:

Parameter PrefixDescription
dd_trait_<trait>Set a user trait (e.g., email, name)
dd_uidSet a unique user identifier (identify call)
dd_aidSet an anonymous user identifier (identify call)
dd_group_<property>Set a group trait (e.g., website, industry)
dd_gidSet a group identifier (group call)
dd_eventTrack an event by name (track call)
dd_prop_<property>Add a property to tracking events (track call)

Tracking Events

You can track events by adding the parameter dd_event to your URL, such as yourdomain.com?dd_event=open-link. You can also add additional properties in the tracking call using the dd_prop_ prefix, for example:

yourdomain.com?dd_event=open-link&dd_prop_page=landing-page

Identifying Users

You can identify a user by adding the parameter dd_trait_email to your URL, such as yourdomain.com?dd_trait_email=john.doe%40dreamdata.io (replace the email with your user's email and URL-encode it). You can also add a user ID via dd_uid and an anonymous ID via dd_aid. Moreover, you can set any other user traits by including parameters with the dd_trait_ prefix, for example:

yourdomain.com?dd_trait_email=john.doe%40dreamdata.io&dd_uid=1234&dd_aid=d66123be

Associating a User with a Group

You can associate a user with a group by adding the parameter dd_gid to your URL, such as yourdomain.com?dd_gid=5678. You can also include the website via dd_group_website=dreamdata.io and add other group properties using the dd_group_ prefix, as shown below:

yourdomain.com?dd_gid=5678&dd_group_website=dreamdata.io&dd_group_industry=software

Complete Example

To apply multiple URL query parameters in a single URL, you can combine them as shown below:

yourdomain.com/welcome?
dd_trait_email=jane.doe%40example.com&
dd_uid=1234&
dd_aid=abcd1234&
dd_gid=789&
dd_group_name=ExampleCorp&
dd_event=signup&
dd_prop_plan=premium

Practical Use Cases

  • Cross-Website Tracking: Use these parameters to maintain user identification across different domains, particularly useful in multi-site environments.
  • Email Campaigns: Enhance link effectiveness by ensuring users are automatically identified when they click a link, optimizing post-click activity tracking.
  • Account-Based Marketing (ABM): Leverage Group ID and Group Website parameters to target and track engagements at the company level, even without specific user identifiers.