Docs
  • INTRO
    • What is Shoplift?
    • What to Test
    • Quickstart
      • Install Shoplift
      • Create a Test
      • Edit Your Variant
      • Launch Your Test
  • TEST
    • Template Testing
      • Overview
      • Guides
        • Guide: Testing Individual Pages
        • Guide: Testing One-Click Payment Methods
        • Guide: Testing App Blocks
        • Guide: Testing Different Template Types
      • Theme Compatibility
      • Template Management
      • Switching Themes
      • Shopify Markets
      • Shopify Translate & Adapt
    • Theme Testing
      • Overview
      • Guides
        • Guide: Testing a Navigation Menu
        • Guide: Testing a Mini Cart
      • Theme Management
      • Theme Development
      • Switching Themes
    • URL Testing
      • Overview
      • Guides
        • Guide: Testing URLs
        • Guide: Testing Product Properties
    • JavaScript API (Beta)
      • isHypothesisActive
      • setAnalyticsConsent
      • getVisitorData
    • Lift Assistâ„¢
      • What is Lift Assistâ„¢?
      • How To Use Lift Assistâ„¢
      • Brand Styles
    • Audience Targeting
      • Devices
      • New and Returning Visitors
      • Custom Audiences (UTMs, Referring Domains, and Geo-targeting)
    • Test Management
      • Test Compatibility
      • Mutual Exclusion
      • QA Checklist
      • Scheduling Tests
      • Pausing Tests
      • Implementing Winning Tests
    • Performance
      • Pagespeed
      • Shopify Caching
      • CDNs and Edge Delivery
  • ANALYZE
    • Reports
      • Overview
      • Metrics
        • Goals & Reporting Metrics
        • Metric Views
      • Test Progress
      • Statistical Significance
      • Channel Groups
    • Tracking
      • Visitor Attribution
      • Web Pixel
      • Liquid Snippet
      • Anti-Flicker
      • Analytics Discrepancies
  • integrate
    • Integrations and Tooling
      • GA4 (Beta)
        • Integrate GA4 (Shopify)
        • Integrate GA4 with Google Tag Manager
        • Integrate GA4 with Elevar
        • Analyze Test Data In Google Analytics
        • Disabling the GA4 Integration
      • Subscription Apps
      • Page Builder Apps
      • Reporting Tools
      • Heatmapping Tools
      • Custom Integrations
  • ADMIN
    • Plans and Billing
      • Subscription Plans
      • Uninstalling Shoplift
    • Users and Permissions
      • Managing Team Access
      • Managing User Notifications
    • Privacy and Compliance
      • Customer Data and GDPR
  • PARTNERS & DEVELOPERS
    • Shoplift Partner Program
    • Testing on Development Stores
  • SUPPORT
    • Frequently Asked Questions
    • Get Help
    • Give Feedback
Powered by GitBook

Contact Us

  • Get help
  • Give feedback
  • Request a feature

Helpful Links

  • Shoplift
  • Shopify App Store
On this page

Was this helpful?

  1. ANALYZE
  2. Tracking

Liquid Snippet

PreviousWeb PixelNextAnti-Flicker

Last updated 9 months ago

Was this helpful?

Shoplift.js (client-side testing script)

Shoplift also leverages a light javascript snippet to allocate tested visitors to appropriate experiences and prevent page "flicker."

When you launch Shoplift, the javascript code required for testing will deploy to your theme automatically, so you don't have to touch any code. A small theme snippet titled shoplift.liquid will be inserted into the /snippets/ directory in your live theme, and is referenced in your theme.liquid file directly after the opening <head> tag.

If you change themes, Shoplift will detect if the testing script is present on your live theme periodically, and also each time the app is launched or a new test is launched. If the testing script is removed, then it will be redeployed automatically at one of these times.

If you modify your theme, please ensure that the code in your theme.liquid remains directly beneath the opening <head> tag, because this ensures that it can operate as quickly as possible to provide a smooth testing experience on your website.

The Shoplift tracking script has a minimal impact on pagespeed, to the tune of around a 2 point reduction when measured with Google's .

We do not recommend removing the Shoplift script because it is required to run A/B tests. If you want to uninstall Shoplift from your store, see .

page performance tool
Uninstalling Shoplift