Skip to main content

varify_success and varify_error

Last updated on Apr 22, 20262 min read

In short​

varify_success and varify_error are two parameters that are used when playing the variant in the varify event are available in the data layer. This parameter information can be sent to GA4 in the same way as the varify_abTestShort parameter in order to obtain information about successful and faulty playouts.

Where can I find the parameters​

The varify_succes and varify_error parameters are passed to the varify event in the DataLayer along with a number of other parameters. You may also recognize the varify_abTestShort parameter that we send to GA4 in order to be able to assign the users to the experiments and variants.

dataLayer push in the browser console with „varify_error: undefined“ and „varify_success: 1“ highlighted

Why send the information to GA4?​

You can send the information from these parameters to GA4 and create your own metric, for example to obtain a key figure for successful or unsuccessful experiment playouts.

We'll show you how.

Send error and success parameters to GA4​

To be able to send the parameters to GA4, you can create a new GTM variable for each parameter and send it to GA4 via the existing Varify Analytics tag. Simply follow these steps.

Step 1: Create parameters as variables​

Go to your Google Tag Manager container and click on Variable. Then create a new data layer variable: New > Variable configuration > Data layer variable

Now enter the following values:

Varify Success Variable:

  • Name the variable at the top left: VA Success
  • DataLayer Variable Name: varify_success (note spelling)
  • Format Value: Convert undefined to...: 0
Google Tag Manager variable „VA Success“: data-layer variable „varify_success“, version 2, undefined converted to 0

Varify Error Variable:

  • Name the variable at the top left: VA Error
  • DataLayer Variable Name: varify_error (note spelling)
  • Format Value: Convert undefined to...: 0
Google Tag Manager variable „VA Error“: data-layer variable „varify_error“, version 2, undefined converted to 0

Step 2: Add variables to the Varify Tracking Linker Tag​

Add the two created variables to your Varify Tracking Linker Tag as additional parameters. You created this tag in your GTM setup (see integration via Google Tag Manager)

  1. go to Tags and open the Varify Tracking Linker

  2. Double-click „Add parameter„

  3. enter the name of the parameter as the event parameter (varify_error and varify_success)

  4. add the corresponding variable as the value ({{VA Error}} and {{VA Success}})

  5. save the customized tag

GA4 event tag „Varify - GA4 Tracking Linker“ with the three event parameters varify_abTestShort, varify_error and varify_success, fired by the trigger „Varify - Event“

Step 3: Publish the customized GTM container​

Publish the customized GTM container by clicking on "Publish" in the top right-hand corner.

Create parameters in GA4 as custom metric​

To be able to use the sent parameters in GA4 as a metric, they should be created as a custom metric.

To do this, go to your GA4 property and click on the admin area at the bottom left (gear icon). Then navigate to user-defined definitions and click on the "User-defined metrics" tab.

Now click on the blue button "Create custom metric" and create a new metric for varify_success and varify_error.

Enter the following values:

  1. Metric Name: „varify_success“ or „varify_error“
  2. Event Parameter: „varify_success“ or „varify_error“
  3. Unit of measurement: Standard
  4. Save the metrics
GA4 dialog „New custom metric“ for „varify_success“ with scope „Event“ and the event parameter of the same name GA4 dialog „New custom metric“ for „varify_error“ with scope „Event“ and the event parameter of the same name

As soon as you have created the two metrics, they collect data and you can use them as metrics in your reports.