1. Home
  2. Docs
  3. Documentation
  4. Goals
  5. How do I create goals and events?

How do I create goals and events?

To create a goal, click on the plus icon in the upper right corner of the goal tile. An input field will appear, here you can create a target in two different ways.

Goals

Type in the URL path of a subpage.

Omit the domain and start directly with the slash, e.g. [/shop], if you want to capture all visitors that land on the page pryvy.io/shop.

The capture starts automatically and you don’t have to do anything else except “SAVE”.

With the paths it is also possible to create so called wildcards.

If you use * at the end of the path, any string will be captured, but no slashes.

If you enter **, slashes are also included.

That is, /product/* would catch /product/123 but not /product/123/abc, but /product/** would catch everything, including /product/123/abc/def/etc.

Events

You can also create individual goals (= events) and in principle capture any action you want.

Just type the name you want to give to the goal into the input field. Thereupon the Javascript trigger appears below the input field, which you have to integrate into your page. It looks like this: pryvy.event(‘your-event-name’).

For example, if you want to track how many visitors click on a certain button, you can add the following javascript to the HTML tag of the button:

onclick=”pryvy.event(‘button-clicked’)”.

You can also add properties to this trigger, which will be sent in the trigger call.

An example:

pryvy.event(‘product-ordered’, { ‘payment method’: ‘PayPal’, ‘customer type’: ‘subscriber’})

If this trigger is executed, you can then evaluate by “payment method” and “customer type” in the dashboard when you click the goal in the list of all goals.

Was this article helpful to you? Yes No

How can we help?