1. Documentation /
  2. Segment.io Connector

Segment.io Connector

WooCommerce Segment.io Connector allows you to track WordPress and WooCommerce activity, and send tracked data to Segment.com.

Installation

↑ Back to top
  1. Download the .zip file from your WooCommerce account.
  2. Go to: WordPress Admin > Plugins > Add New to upload the file you downloaded.
  3. Activate the plugin.

More information at: Installing and Managing Plugins

Enable plugin updates

↑ Back to top

Please follow the steps listed here to enable plugin updates for Segment.io Connector.

Which source to use in Segment.com

↑ Back to top

Login to your account on Segment.com. Go to Sources > Add source. Use the search on the left and either search for PHP or Project. You can use either of them to enable tracking via this plugin.

How it works

↑ Back to top

Automatically track:

  • e-commerce events – view product, add to cart, checkout, payment
  • customer activity – registration, logging in, viewing my account
  • site events – view page, comment, view blog post

No coding necessary. No changes to JavaScript / CSS or theme files. No touching PHP or HTML.

WooCommerce Segment.io Connector integrates with Segment.io (https://segment.com/) – an analytics aggregation and relay service. Segment.io lets you send your analytics data to any service you want, without you having to integrate with each one individually.

Segment.io lets you send your analytics data to:
AdRoll, BitDeli, BugHeard, bugsnag, Chartbeat, ClickTale, Clicky, Comscore, Countly, Crazyegg, Crtittercism, Customer.io, Errorception, Flurry, Foxmetricks, Guages, Google Analytics, GoSquared, Heap, Help Scout, HitTail, HubSpot, Improvely, Intercom, Keen.io, KISSmetrics, Klaviyo, Librato, LiveChat, Localytics, Lytics, Marketo, Mixpanel, Olark, Ominture, Optimizely, Outbound, Pardot, Perfect Audience, Pingdom, Preact, Qualaroo, Quantcast, Salesforce, Sentry, SnapEngage, Totango, USERcycle, Userfox, UserVoice, Vero, Visual Website Optimizer, Woopra, Webhooks, without having to integrate with each and everyone, saving you a ton of time.

Segment.io stores your analytics data for later use. So if you want to switch between these services, you can do that by clicking a button. No changes required on your website. No manual imports. No loss of data!!

Which events from WooCommerce are tracked?

↑ Back to top

Following events will be tracked by default:

  • Registration form seen
  • New user registered
  • Logged in
  • Logged out
  • Viewed account
  • Password changed
  • Address updated
  • Track post
  • Track page
  • Track archive
  • Track searche
  • Viewed product
  • Added to cart
  • Removed from cart
  • Viewed cart
  • Coupon applied
  • Checkout started
  • Calculated shipping
  • Payment started
  • Completed purchase
  • Viewed order
  • Tracked order
  • File downloaded
  • Re-ordered
  • Order cancelled
  • Commented
  • Reviewed product

If you are a developer, you can easily track any additional events too. See developer guide

Usage

↑ Back to top

How to setup? How to start tracking activities of WooCommerce store?

  1. You need to enter & save your Segment.io’s API key in WooCommerce Integration settings, otherwise no event will be sent to Segment.io
  2. Go to ‘WooCommerce -> Settings’ & look for ‘Segment.io Connector’ link under ‘Integration’ tab.
  3. Put your Segment.io API key in field provided on that page & click ‘Save changes’.
Segment.io Connector setting
Segment.io Connector setting
  • That’s it! Now activities on your site will be tracked and sent to Segment.io.
  • Developer

    ↑ Back to top

    How to track events from third party plugin?

    For tracking any event you need four details:
    Event name (required)
    Event data (optional)
    User ID (optional)
    User’s data (optional)

    Once you have these, you can use following code in any php file of that third party plugin.

    <?php
    $event_name = 'sample event';
    $event_data = array( 'title' => 'product title' );
    $user_id = 5;
    $user_data = array( 'dob' => '01-01-1990' );
    
    do_action( 'woocommerce_segmentio_connector_log_activity', $event_name, $event_data, $user_id, $user_data );
    ?>

    Frequently Asked Questions

    ↑ Back to top

    1. Events are not being tracked. I can’t see any data in Segment.io?

    ↑ Back to top

    Please check:

    • whether you’ve entered & saved your Segment.io API key.
    • you are not looking for events of WordPress admin (backend) in Segment as Segment will only track frontend events on your site
    • you have footer (wp_footer) present in your template

    2. Can I track additional events (from third party extensions)?

    ↑ Back to top

    Yes, it is very easy to track those additional events which are not tracked by this extension. You just need to call a function with some data. Please refer developer guide for details.

    Questions & Support

    ↑ Back to top

    Have a question before you buy? Please fill out this pre-sales form.

    Already purchased and need some assistance? Get in touch the developer via the Help Desk.