🔗 Integrate Hoppy Cookie with TikTok Pixel

Connecting TikTok Pixel with Hoppy Cookie allows TikTok tracking to respect the consent preferences selected by your visitors.

Instead of loading immediately when a visitor arrives on your storefront, TikTok Pixel only becomes active when Marketing consent is granted. This helps merchants maintain a more privacy-friendly tracking setup while continuing to support TikTok advertising, audience building, conversion tracking, and campaign measurement when visitors opt in.


⚠️ Before You Begin

Before enabling TikTok Pixel, make sure:

  • Hoppy GDPR EU Cookie Banner is installed and active
  • Your Cookie Banner is published
  • You have access to TikTok Events Manager
  • You have your TikTok Pixel script snippet available

You can retrieve the script directly from:

TikTok Events Manager

⚠️ Important:

If TikTok Pixel is already installed directly inside your Shopify theme or through another app, remove the existing implementation before enabling this integration.

Running multiple TikTok Pixels can cause:

  • Duplicate tracking
  • Duplicate events
  • Inaccurate reporting

🛠️ Step 1 — Open the Integrations Section

Inside your Shopify Admin:

→ Open Hoppy GDPR EU Cookie Banner

→ Click Integrations

Locate:

TikTok Pixel

and open the integration page.

If the integration has not been configured yet, the status will display:

→ Off


🔑 Step 2 — Paste Your TikTok Pixel Script

Locate:

TikTok Pixel Script

Paste the complete TikTok Pixel script provided by TikTok Events Manager.

Example

<script>
...
</script>

⚠️ Paste the entire script exactly as provided.

This includes:

  • Opening <script> tags
  • Tracking configuration
  • Closing </script> tags

Removing or modifying portions of the script may prevent TikTok Pixel from loading correctly.


⚙️ Step 3 — Enable the Integration

After pasting the script:

→ Toggle Integrate with TikTok Pixel to On

Once enabled:

  • The status changes to On
  • TikTok Pixel becomes available
  • Tracking behavior becomes controlled by visitor consent preferences

Marketing consent is now used to determine whether TikTok tracking can run.


💾 Step 4 — Save Your Changes

After entering the script and enabling the integration:

→ Click Save

The configuration is automatically synchronized to your storefront.

No additional theme edits are required.


🔄 How the Integration Works

Once enabled, TikTok Pixel behavior automatically responds to visitor consent preferences.


When Marketing Consent Is Accepted

If a visitor accepts Marketing cookies:

✅ TikTok Pixel loads

✅ TikTok tracking becomes active

✅ Advertising measurement can occur

✅ Audience building and conversion tracking become available

This allows TikTok campaigns to collect approved visitor interactions.


When Marketing Consent Is Denied

If a visitor declines Marketing cookies:

❌ TikTok Pixel does not load

❌ Tracking requests are blocked

❌ Advertising-related activity is prevented

This helps ensure tracking aligns with visitor consent preferences.


When Consent Preferences Change

If a visitor updates their preferences later:

  • TikTok tracking can be enabled
  • TikTok tracking can be disabled

depending on the updated Marketing consent selection.

The integration automatically adjusts tracking behavior as needed.


🧪 Step 5 — Verify the Integration

After saving, it's recommended to verify that the integration is functioning correctly.


Test with Marketing Consent Denied

→ Open your storefront in an Incognito or Private browser window

→ Decline Marketing cookies

Then:

→ Open Developer Tools

→ Open the Network tab

→ Search for:

tiktok

or

ttq

Expected Result

No TikTok tracking requests should appear.

This confirms the integration is correctly blocking TikTok Pixel.


Test with Marketing Consent Accepted

Repeat the test using a fresh Incognito window.

This time:

→ Accept Marketing cookies

→ Refresh the page if necessary

Then:

→ Open the Network tab

→ Search for:

tiktok

or

ttq

Expected Result

TikTok Pixel should load successfully.

A PageView event should also fire automatically.


Check Browser Console

Open Developer Tools and switch to the Console.

Review the output for:

  • TikTok initialization messages
  • Tracking errors
  • Script loading issues

Any errors shown here can help identify configuration problems.


⚠️ Common Troubleshooting

TikTok Pixel Loads Before Consent

This usually indicates TikTok Pixel is installed elsewhere.

Check:

  • Shopify theme code
  • Theme App Extensions
  • Other Shopify apps
  • Custom tracking scripts

Remove duplicate TikTok installations and allow Hoppy Cookie to manage the pixel directly.


TikTok Pixel Does Not Load After Consent

Verify:

  • The complete TikTok script was pasted correctly
  • The integration is enabled
  • Changes have been saved
  • Marketing consent has been accepted

Missing portions of the script can prevent TikTok Pixel from initializing.


Duplicate Events in TikTok Events Manager

Duplicate events usually occur when TikTok Pixel is loaded from multiple locations.

Only one TikTok implementation should remain active.


No TikTok Activity Appears

Verify:

  • The correct TikTok Pixel script was used
  • Marketing consent was granted
  • Tracking requests are visible in Developer Tools
  • No JavaScript errors are preventing initialization

Testing with an Incognito window is recommended.


⚠️ Important Notes

Marketing Consent Controls TikTok Tracking

TikTok Pixel responds specifically to the Marketing cookie category.

If Marketing consent is denied, TikTok tracking remains disabled.


The Full Script Is Required

Unlike some integrations that only require an ID, TikTok Pixel requires the complete script snippet provided by TikTok Events Manager.


No Theme Coding Required

Once configured, the integration manages TikTok Pixel automatically.

No additional theme modifications are necessary.


Avoid Duplicate Installations

Never load TikTok Pixel simultaneously through:

  • Hoppy Cookie
  • Theme code
  • Another app
  • Custom tracking scripts

unless specifically configured to prevent duplicate events.


🎉 Final Result

Once configured successfully:

✅ TikTok Pixel only loads when Marketing consent is granted

✅ Visitors who decline Marketing cookies are not tracked

✅ Advertising measurement remains available after consent

✅ Audience building and conversion tracking work as expected

✅ No manual theme coding is required

✅ Tracking behavior remains aligned with your Cookie Banner preferences

The TikTok Pixel integration helps merchants balance advertising performance and visitor privacy by ensuring TikTok tracking only activates when appropriate consent has been provided.