Guides
WordPress
Integrate Alytica with your WordPress website.
Prerequisites
- An Alytica account
- Client ID (and optional Client Secret)
- WordPress website
- WordPress admin access
Method 1: Using Header and Footer Plugin
Step 1: Install Plugin
- Go to WordPress Admin Panel
- Navigate to Plugins > Add New
- Search for "Header and Footer Scripts"
- Install and activate plugins like:
- "Insert Headers and Footers"
- "WP Scripts & Styles Optimizer"
- "Header Footer Code Manager"
Step 2: Add Tracking Script
- Go to the plugin's settings
- Paste the following in the "Head" section:
Method 2: Edit Theme's functions.php
Step 1: Locate functions.php
- Go to Appearance > Theme Editor
- Select your active theme's
functions.php
Step 2: Add Tracking Script
Method 3: Using Google Tag Manager
- Install Google Tag Manager plugin
- Add Alytica script as a custom HTML tag
- Set tag to fire on all pages
Advanced WordPress Tracking
WooCommerce Tracking
Track purchase events:
User Registration Tracking
Troubleshooting
- Verify Client ID accuracy
- Check browser console for errors
- Ensure script loads on all pages
- Test tracking in incognito/private browsing mode