Skip to main content
Skip table of contents

How to populating Goal Type values using tags?

Context

In Piano Analytics, you can populate the Goal Type property (property_key: goal_type) directly from your tagging to identify the events that correspond to a goal completion.

Historically, goals were declared by defining a goal page (with a primary or secondary type) and then receiving a hit containing a page load. This approach is no longer required: any event type (page view, click, or custom event) can be considered a goal as long as it carries the goal_type property.

The Goal Type property enables users to declare a wider variety of objectives.

Tagging goal types

In order to populate the Goal Type property directly from the tag, make sure that:

  • You are using a recent version of SmartTag (JS: 5.21.0 / Android: 2.17.0 / iOS: 2.18.0) or the Piano SDK.

  • You are using the custom property setting method described in our developer documentation with the following tag, taking care to edit the goal value:

CODE
tag.setProp('goal_type', 'objectivevalue');

or for Piano SDK (developer documentation):

CODE
pa.setProperty('goal_type','signup');

By adding this tag to your relevant events with objectives, you will inform, for each event, the corresponding value for the property goal type.

If updating existing tags is not feasible, you can populate goal_type using a processing rule in the Data Management interface. Please refer to https://analytics-docs.piano.io/en/analytics/v1/declare-a-goal-with-data-management

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.