Halloween Sale 15% off Ends in See the plans

Snippet Library

Analytics & Tracking snippets for WordPress

Snippets for analytics and tracking: add Google Analytics, Tag Manager or ad pixels, exclude logged-in users and track clicks or form sends. For marketers who want the tracking code in place without editing the theme.

1–5 of 5 snippets “data”

  • PHP Analytics & Tracking

    Page Details in the GTM dataLayer

    Pushes page information (page type, post type, categories, author, publish date and login status) to the dataLayer before Google Tag Manager loads, for use in tags and triggers.

  • PHP Analytics & Tracking

    Scroll Depth Events in the dataLayer

    Pushes scroll_depth events to the Google Tag Manager dataLayer when visitors scroll 25, 50, 75 and 90 percent of a page, to measure how far content is read.

  • PHP Analytics & Tracking

    Simple Analytics

    Adds the cookie-free Simple Analytics script to your public pages. No tracking ID is needed: data is matched to the domain you added in Simple Analytics.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.