Javascript Trigger to Start Funnel

 

What are JavaScript triggers?

This is a simple line of code. Which enables you to activate any of TruConversion feature at a specified moment during visitor session. For now this feature is available in Funnel Analytics and Session Recording but soon it will be available in others tools.

 

Using JavaScript Triggers in Funnel Analytics?

This example below shows you how to use a JavaScript trigger in funnel.

1. Select JavaScript trigger from your page targeting panel. You can add multiple Page URL and triggering rules in a single steps.

2. Enter a unique name for you trigger.

Complete your funnel steps and click “Create Funnel”.

3. Now add this trigger code to your website.

Here is JavaScript Code:

    tcjs(‘trigger’,’cf’, ‘unique-trigger-name’);

In the example above, you’ve created a trigger called startfunnel. Just replace “unique-trigger-name” with startfunnel and add this trigger code to your website:

    tcjs(‘trigger’, ‘cf’, ‘startfunnel’);

Whenever this code is trigger by visitor your funnel step is marked as complete.

 

Using JavaScript Trigger Code in iframe Window

User can add javascript trigger code in iframe after placing TruConversion tracking code in iframe. This Triggering code can be added in button or any other event in iframe.

 

Using JavaScript Trigger Code Through Google Tag Manager

If you are using Google Tag Manager to add our JavaScript trigger then use this code:

    <script type=”text/javascript”>tcjs(‘trigger’, ‘cf’, ‘unique-name-here’);</script>

For example:

Note: This code must be added after the TruConversion Tracking Code. If it is added before, a JavaScript error will occur.