Skip to content

Dynamic streams

With a dynamic special stream you create one stream and decide directly on your website which content it shows. You can filter by category, brand, tag or creator.

This is useful when several streams should look the same and only differ in their content. Instead of creating a separate special stream for every category, you use the same stream everywhere and only change the filter in the code snippet.

Example: You want to show matching customer content on 20 category pages. You create one dynamic stream and embed it on all 20 pages, each with its own category filter.

  • Your content in the UGC platform has the information you want to filter by, for example linked products with category and brand, or assigned tags. A dynamic stream can only show content that has this information.
  • You can edit the HTML of your pages or templates, or someone on your team or your agency takes care of it.
  1. In the UGC platform, open Settings → Delivery → Special Streams.

  2. Click Create Special Stream.

  3. Select Dynamic as the stream type.

  4. Under Your snippet can filter by, choose which attributes your website may send, for example category, brand or tag. Choose at least one.

    The Create new Special Stream form with the stream type Dynamic selected and the filter options Category, Brand and Tag

  5. Save the stream and copy the code snippet shown.

  6. Set the design and template, just like for a classic stream.

Add the snippet to every page where the stream should appear. The filter attributes decide which content is shown. Everything else in the snippet stays the same on all pages.

Example: category page “Sneakers”

<div data-sq-container='sqln-YOUR-STREAM-ID'
data-sq-stream='YOUR-STREAM-ID'
data-sq-sub='YOUR-SUBSCRIPTION-ID'
data-sq-template='gallery'
data-sq-lang='en_com'
data-sq-category='sneakers'>
</div>

Example: category and brand combined

<div data-sq-container='sqln-YOUR-STREAM-ID'
data-sq-stream='YOUR-STREAM-ID'
data-sq-sub='YOUR-SUBSCRIPTION-ID'
data-sq-template='gallery'
data-sq-lang='en_com'
data-sq-category='sneakers'
data-sq-brand='nike'>
</div>
Attribute Filters by Example
data-sq-category Product category data-sq-category='sneakers'
data-sq-brand Brand data-sq-brand='nike'
data-sq-instagram Instagram username data-sq-instagram='squarelovin'
data-sq-tiktok TikTok username data-sq-tiktok='squarelovin'
data-sq-tag Tag in the UGC platform data-sq-tag='summer'
  • You can set one or more filters at the same time. Filters you leave out are ignored.
  • With several filters, the stream only shows content that matches all of them.
  • You can set several values per filter, separated by commas, for example data-sq-tag='summer,sale'. The stream then shows content that matches any of the values.

The stream shows no content. The filter value usually does not match the data in the UGC platform. Check that the value is spelled exactly as in the UGC platform, then check that there is published content with this category, brand or tag.

I want to show several streams on the same page. That works. Add a separate snippet for each stream. You still only embed the squarelovin script once per page.