Articles on: Advanced Feature Guides

HOW TO: Configure Events - Advanced Variables

HOW TO: Configure Events - Advanced Variables



Please use the following instructions when configuring the advanced variables for events. We have provided some example syntax and will detail how to configure the 3 methods of tracking an event - Page Load, OnClick and OnSubmit.

Example Syntax (for reference with below instructions)



<div class = “demoClass” id = “demoId” value=”Demo” exampleAttr=”ExampleVal”>Demo</div>

<form className=”formClass” id=”formId”>
<input type =”text” id=”firstNameId” class=”firstNameClass” name=”firstname” value=”Test FirstName”>
<input type =”button” id=”buttonId” class=”buttonClass” value=”Test Button”>
</form>

<div class=”msgClass” id=”msgId”>Message</div>

PageLoad



Page Load

Form/Clicked Element – Empty

Changing Element -Empty

Event Data


- Parameter

Select any from the drop-down list

[Content Id's selects the multiple value from the given selector]

- Element Type

Static/Dynamic

Static Value

If Static is selected in Element type Enter Static value, “Website Name (Example: Facebook)”

- Selector

Elements with their tag, if its class need to add “.” Or if it’s a ID need to add “#” in front of the values

Example using Example Syntax

Value: “**.demoClass**” (for Class)/ “**#demoId**”(for ID)
Attribute (For retrieving custom attributes from the elements)

Example using our Example Syntax above


For retrieving ExampleVal use “**exampleAttr**” for retrieving value use “value”


OnClick



OnClick Example

- Form/Clicked Element

id or Class of the element

Example using Example Syntax


Value: “**.buttonClass**” (for Class)/ “**#buttonId**”(for ID)

- Changing Element - Empty

Event Data

Similar to PageLoad Event’s Event Data


OnSubmit



OnSubmit Example

- Form/Clicked Element

id or Class of the element

Example using Example Syntax

Value: .formClass (for Class)/ #formId (for ID)

Changing Element - Optional

id or Class of the element

You only need to enter the value if the submit functionality is disabled and Ajax is used.

This will then check whether the given element has any changes after the request

If there is any changes, the trigger is fired.

Example using Example Syntax

Value: .msgClass (for Class)/ #msgId (for ID)

Event Data

- Parameter

Select any variable from the drop-down list except the options which contains multiple values (Like: Content Ids, Contents)

- Element Type

Static/Dynamic

- Static Value

If Static is selected in Element type enter a Static Value, “Website Name (Example: Facebook)”

- Selector

Form elements name ()

Example using Example Syntax

Value: firstname for First Name Element

Attribute (Optional)

For retrieving custom attributes from the elements

Example using Example Syntax

For retrieving ExampleVal use exampleAttr for retrieving value use value

Updated on: 14/09/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!