Segment.com and integrating Services with ease
In this post I'll go through the segment.com service which is great for integrating resources and using a single code in your applications to link them together such as
Segment is a service that allows you to connect multiple services between each other. They have over 450 pre-built integrations that you can simply turn on with a flick of a switch.
I use Segment.com in many of my applications because it lets me add a single Segment script to my site, and from that I can control all the various integrations on my site through the dashboard. This includes analytics (google analytics, tag manager, etc), monitoring (fullstory, sentry, etc) and many more services and it’s extremely easy to configure and add to your web site or application.
You can view their full list of integrations at the below link:
Adding Segment to your Site
After you create an account you can create a new integration by selecting a source and destination.
The source you can choose from a wide range of options, in my situation I’m selecting a Javscript website and then for the destination select one or a few of the wide range listed.
2 that i regularly add would be the Google analytics destination and fullstory destination. This means I don’t have to put wither of their code directly onto my site, I just add the Segment code and it will load the rest of the integrations code, super easy.
Once you have your destination and source setup, in the overview tab of your source, it gives you the full snippet and the code related to your segment instance to add to your site.
Once it’s added to your site, you can go to the debugger in the top menu and it will show page loads if all configured on your site correctly.
Summary
This is a very handy service and the free version is still quite handy and has generous limits.
You can also configure the traffic and monitoring to output various tags and events to various triggers and destinations.
Segment allows you to add multiple resources to your site or app without having to constantly add extra code whenever a new service is required to your site and their list of integrations keeps increasing.
Hope this helps you when trying to work out and add your next integration to your project.
Until next time, happy dev-ing :)