How to use segment by URL

What is segmentation?

Segmentation is a useful tool to show your users the content that will interest them the most. You can attach segments to each of your posts in any combination you want. At the moment of embedding the Beamer Script, you can include the filter parameter to define what of those posts you want to show to a specific user. You can learn how to do that in our Documentation.

You can learn more about segmentation in these tutorials:

How to use segmentation by URL?

A third way to use segmentation is based on URL. That means that Beamer will check for posts that are matched to the current URL as it were an extra filter.

  1. Enable the segmentation by URL feature by going to your Beamer Dashboard > Settings > General. Then to the Feed & panel section. There you should enable the Segment posts by URL option (green means it is enabled). Don’t forget to save your changes.
  2. Once the option is enabled you’ll see a new field called Segment URLs (show only in these URLs) in your post editing screen.
  3. When you are creating or editing a post add the URL you want to match in the X field. Then save the changes. That will attach that post to that particular URL.
    You can add multiple URLs by separating them with semicolons (;). For example:

    http://www.getbeamer.com;http://www.hibox.co;https://intercom.com/

    You can also use asterisks (*) as wildcards to target an entire group of variable URLs. That will target all URLs that match the one written regardless of what replaces the *. This example will target all posts in our blog:

    http://www.getbeamer.com/blog/*
  4. To make it work you need to include the parameter filter_by_url as true in your Beamer Embed code, as the parameter si set to false by default. If you include it as false, Beamer will ignore the filter.
    <script>
    	var beamer_config = {
    		filter_by_url : true
    	};
    </script>
    Important: Remember that the Beamer Embed code must include other parameters. If you need more information on how to use it, please consult our Documentation or this tutorial.
  5. Once you have completed this for the pages and posts you like, Beamer will check the current URL and will fetch only the posts that match that URL.