Tracking customer information via URLs

You can capture information about your customers that is contained in the URLs that they visit on your site.

To track customer information via website URLs, you need to:

  • Define a custom attribute place holder to store the data.
  • Specify the string that is contained in URLs that you want to check.
  • Specify rules used to track the customer information.
  • Publish the rules so that real-time tracking can begin.

Example use case

Assume you want to track the most recent accessory pages that your customer visited, such as Belts, Sunglasses, and Jewelry. For example, when the customer goes to http://sale.example.com/accessories/belts, capture information about the visit.

To track customer data contained in URLs:

  1. From the main menu, select Custom Attributes.
  2. Select the custom attribute you want to use for tracking. If the Custom Attribute you need is not in the list, create it:
    1. Add a custom attribute.
    2. Enter an attribute name, such as Accessories.
    3. Select the Preset attribute type.
    4. Enter the following values: Belts, Sunglasses, Jewelry, and None.
    5. Save the new attribute with its preset values.
  3. To specify rules to define how to capture the value, select Add from the Rules column.
  4. From the drop-down list on the Properties tab, select URL as the capture method.
  5. Define rules that will auto-generate the right code:
    1. Define rules that track the Accessories attribute:
      1. If URL contains belts then set attribute to Belts.
      2. If URL contains sunglasses then set attribute to Sunglasses.
      3. If URL contains jewelry then set attribute to Jewelry.
      When all other rules fail:
      4. Set attribute to None.

    2. Save this configuration.
  6. Click the URL tab to add the URLs where this attribute can be captured. For example, you can add your website's home page to track all site pages.
  7. Enter at least one URL and save it.
  8. From the main menu, select Publish Center.
  9. In the publish center, find the Accessories attribute in the list of objects that are being edited (with Editing filter).
  10. Select the attribute and mark it ready for publish. The Accessories attribute is now displayed in the Publish Queue.
  11. Publish the attribute so that it goes live and begins tracking.

Note: Custom attribute scripts are executed after any site-level scripts.

tracking via URLs, Preset, Freetext, free text, attribute types