To effectively segment and target users based on specific interactions, Loop allows the integration of custom tags through various methods.
Use case example
Imagine managing a car marketplace where users frequently search for electric vehicles. By implementing custom tags, you can identify users interested in electric cars and target them with specific campaigns.
Implementation
There are three different methods to send custom tag data and events using the Loop JavaScript tag:
1. Adding Custom Tags Directly to Web Pages:
Include this script tag into the HTML of the page you want to send data from
<script>
_rely.push({'tags': 'tag1,tag2,tag3,tag4'});
_rely.send();
</script>Example:
For a page about electric cars:
<script>
_rely.push({'tags': 'electric_car,tesla'});
_rely.send();
</script>
Use Case:
Directly embedding tags is suitable for static elements where the content and user interactions are consistent.
2. Adding Custom Tags via Event Handlers:
Implementation:
Incorporate the tagging script within specific user interaction events, such as button clicks:
<button onclick="_rely.push({'tags': 'button_clicked'}); _rely.send();"> Click Me </button>
Use Case:
Ideal for dynamic interactions where tags should be sent only upon specific user actions, ensuring accurate tracking of behaviors like button clicks or form submissions.
3. Adding Custom Tags Using Google Tag Manager (GTM):
Implementation:
Create a Custom HTML Tag in GTM:
Log in to your GTM account and navigate to your workspace.
Go to Tags > New > Tag Configuration > Custom HTML.
Insert the custom tag script:
<script>
_rely.push({'tags': 'desired_tag'}); _rel
.send();
</script>
Set Up a Trigger:
Determine when the tag should fire by setting up appropriate triggers:
Page View Trigger: Fires the tag when a specific page is viewed.
Click Trigger: Fires the tag when a particular element is clicked.
Form Submission Trigger: Fires the tag upon form submission.
For detailed guidance on setting up triggers, refer to Google Tag Manager's trigger documentation.
Use Case:
Utilizing GTM is beneficial for managing tags without directly modifying website code. It offers flexibility to deploy and adjust tags based on various user interactions through an intuitive interface.