Track the Times a Specific Event or Action Triggered

To track the number of times a specific event or action is triggered on your site, follow these steps:

  1. Click Event.
  2. In the Event definition field, select from the three menu items: Category, Action, Label, or Value.
native ad stream placement

  1. Click Create conversion rule.

To record an event goal, you add a snippet of JavaScript code (along with the tag) to your website where the user action occurs.

<script type="application/javascript">
window.dotq = window.dotq || [];
window.dotq.push(
{
 'projectId': '10001234567890',
 'properties': {
   'pixelId': '654321',
   'qstrings': {
     'et': 'custom',
     'ec': 'event category',
     'ea': 'event action',
     'el': 'event label',
     'ev': 'event value',
     'gv': 'conversion value'
  }
} } ); </script>

Important

You can define at least one of four values for event goals to work. Note that it’s mandatory that you define at least one of the four values.

Value Event Goal
Category Provide a name for the group of objects you want to track, like clothes, electronics or furniture.
Action` Specify the type of interaction the user takes with the object, like clicks.
Label Enter comments about the event, like Placing an order,Make a request, Download button.
Value These must be non-negative and are used for tracking counts, like an order that contains 5 items.

An Example Use Case

The following example shows how you might use the custom event script to capture the event of a user adding a $249 electronics item to a shopping cart:

<script type="application/javascript">
window.dotq = window.dotq || [];
window.dotq.push(
{
  'projectId': '10001234567890',
  'properties': {
    'pixelId': '654321',
    'qstrings': {
      'et': 'custom',
      'ec': 'shopping',
      'ea': 'add to cart',
      'el': 'add to cart',
      'ev': 'electronics',
      'gv': '249.00'
    }
} } ); </script>