Tracking events on your webpage involves implementing specific tracking code snippets—commonly referred to as “pixels” or “tags”—that capture user interactions on your site. Here’s how to set up event tracking on different platforms:
Access Tag Manager: If you are using Google Tag Manager (GTM), navigate to your container.
- New Tag: Create a new tag and select “Google Ads Conversion Tracking” as the tag type.
- Event Trigger: Set up triggers that correspond to the events you want to track, such as page views, button clicks, or form submissions.
- Deploy: Publish the changes in GTM.
If you’re not using GTM, you can also add the conversion tracking code snippet directly to your website’s HTML on the specific page where the action takes place (e.g., a ‘Thank You’ page after a purchase).
- Pixel Creation: In the Facebook Ads Manager, go to “Pixels” under “Events Manager” and create a new pixel if you haven’t already.
- Install Pixel: Install the base pixel code on every page of your website.
- Event Code: Add specific event code snippets where you want to track actions, like button clicks or page visits.
- Conversion Tracking: In Twitter Ads Manager, create a new conversion event.
- Tag Creation: You’ll get a piece of code, known as a universal website tag, which you should place on your website.
- Event Snippets: Add specific event snippets to track particular actions like ‘Purchase’ or ‘Signup’.
- Pixel Installation: Create a TikTok pixel in TikTok Ads Manager and install the base code on your website.
- Event Set-Up: Set up event tracking within TikTok Ads Manager to track specific actions like page views, clicks, or form submissions.
General Steps for Event Tracking
- Identify Events: First, identify which actions (events) you want to track—e.g., clicking a ‘Buy Now’ button, submitting an email address, etc.
- Code Placement: For each event, you’ll place a small piece of code on the part of your website where the action takes place. This could be within a button’s HTML, on a particular webpage, or within a form.
- Test: Always test to make sure the events are being tracked correctly. Each platform usually offers a way to view incoming events in real-time for testing.
- Review & Optimize: Once data starts flowing in, review it regularly and optimize your campaigns accordingly.
Remember that tracking user data comes with the responsibility of adhering to data protection and privacy regulations like GDPR, CCPA, or any applicable local laws. Always be transparent with users about the data you collect and how you use it.