Skip to content

Instantly share code, notes, and snippets.

View leo8nardo8's full-sized avatar

Leonardo Thomas leo8nardo8

View GitHub Profile
@leo8nardo8
leo8nardo8 / Facebook Pixel Advanced Matching and Event Tracking Script.html
Created June 12, 2024 20:43
Initiates and configures Facebook Pixel with Advanced Matching parameters and tracks specified events.
<!--
!!! Even if you already trigger your pixel you have to re-initiate the pixel to populate the Advanced Matching properties.
Use case: Send 'Lead' event with 'Email' parameter for Advanced Matching purpose.
Advanced Matching documentation: https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching/
Standard Events Reference: https://developers.facebook.com/docs/meta-pixel/reference/
-->
<script>
@leo8nardo8
leo8nardo8 / ClarityEvent.html
Last active June 11, 2024 15:04
Clarity tag for events and parameters in GTM
<!--
!!! Clarity global tag must trigger before this APIs calls.
> Use case example: Send 'purchase' event with 'coupon' parameter.
Documentation for events: https://learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-api#add-custom-events
Documentation for custom tags: https://learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-api#add-custom-tags
-->
<script>
window.clarity("event", "<event_name>"); // Replace <event_name> for the desired event