Sales tracking using custom parameters (UTM-tags)

E-commerce businesses require tracking actions like add to cart and purchases. Using UTM parameters and custom URL parameters to your links you can leverage your existing analytics platform (like Google Analytics) by using UTM-tags and custom parameters to capture conversion data.

The concept is simple, by adding a tag to the link our customer will be able to filter their website traffic based on if the user has clicked on a product link sent by an ebbot AI Agent.

Custom parameters

Custom parameters are query strings (like ?AI-agent or ?product_id=123) you add to a URL, they do not automatically populate standard reports like Source or Medium. To make them useful for analytics, they must be manually configured in a tag manager and registered in your analytics tool as a custom dimension for tracking.

Base URL: https://www.yourdomain.com/product1

With custom parameter: https://www.yourdomain.com/product1?AI-agent

With advanced custom parameter https://www.yourdomain.com/product1?AI-agent&product_id=123

UTM-tags

UTM tags are a standardized set of five specific URL parameters (utm_source, utm_medium, utm_campaign, etc.) recognized by analytics platforms to automatically populate key reporting dimensions. They are the essential, structured method for overriding default attribution and measuring the traffic, source, and medium of external marketing efforts.

Parameter

Recommended Value (Example)

Purpose

utm_source

AI-agent (or your AI's name)

Identifies the software/platform that generated the link.

utm_medium

chat (or ai-response)

Identifies the type of interaction or channel used to deliver the link.

utm_campaign

organic-link (or user-query)

Provides a grouping term for all links generated by the LLM in non-promotional contexts.

Base URL: https://www.yourdomain.com/product1

With UTM-tag: https://www.yourdomain.com/product1?utm_source=AI-agent&utm_medium=chat&utm_campaign=organic-link

The recommended values are just suggestions and can be set to whatever the customer prefers.

Use the source transformer

Using the transformer you can create a rule that adds parameters to every link in a source. For example, in the URL-column always add ?AI-agent in the end of the text. Below is one example of how to do it. For more information about the transformer click here.

Replace 'url' with the name of the column containing the link. Replace '?AI-agent' with the custom parameter you want added to the link

  {
    "type": "put",
    "value": {
      "type": "concat",
      "values": [
        {
          "type": "get",
          "source": "url"
        },
        {
          "type": "value",
          "value": "?AI-agent"
        }
      ]
    },
    "target": {
      "type": "value",
      "value": "url"
    }
  },

Without transformer: https://www.yourdomain.com

With transformer: https://www.yourdomain.com?AI-agent

Prompt the AI-agent

Write instructions in the persona that every time the AI-agent sends a product link it should add ?AI-agent at the end of the link.

Last updated

Was this helpful?