Imagine looking at a huge pool of data. Do you think it is humanly possible for someone to identify patterns and draw insights from that? A genius perhaps, but not for most of us. That’s why, we need segmentation! Segmentation is a powerful concept that allows us to group and isolate data for further analysis. By creating a segment, we are able to narrow down to a particular set of data that we are interested in and work from there. Interested in understanding more about the web behavior of millennials in Singapore? Create a segment where you define the appropriate age range and set the country to Singapore.
Why Do We Need Segment ID?There can be many reasons as to why you would like to obtain the ID of all the segments you have created. For me, it all started off with using Google Sheets to create highly customized reports using the data from Google Analytics. Other usages are often associated with data visualization using 3rd-party tools too (eg. Chartio). If there’s anything that I missed out, feel free to let me know!
How Do We Obtain Segment IDs?It is actually quite simple. Just follow the step-by-step guide provided below, and you’re good to go!
- Visit https://ga-dev-tools.appspot.com/query-explorer. Click on “Click here to authorize“. This will allow Query Explorer to gain access to our Google Analytics.
- Scroll down and we will find the section “Set the query parameters“. In the dropdown box for segment, we can find both the default system-generated segments, and the custom segments created by us. As highlighted, we can now obtain the Segment ID!
- As Segment ID is often a randomized string, it is advisable to copy the entire string without having to eyeball the string and type it out ourselves. What we need to do is to first select the segment ID of interest.
- Now, double-click on the string. You should have the whole string highlighted and it’s time to copy using Ctrl-C (or Command-C if you’re using Mac). Paste it in a notepad or somewhere to verify that the string has been copied successfully.