How to track multiple events with one structured event call


#1

Hi Guys!
We need to track the term impressions on the page. We managed to setup it with Struck Event call using GTM.

$.each(terms, function( index, term ) {
window.snowplow(‘trackStructEvent’, ‘term’,‘impression’, term, 1, 1);
});

There can be a lot of terms on the page, consequently, we send multiple calls and that affects page speed.

We want to send all the terms impressions at once. Is it possible to send a bunch of Struct Events with one request?


#2

Hi @Iuliia,

I think you might be looking for POST requests?.

However, it might be simpler to use the out of the box impression tracking, a custom self-describing event? You can define as many fieds as you want and send them all together.

Or, you could send as many custom contexts as you like with the one event - so you could define an impression context, and attach it to eg. a page_view event once per impression/term.


#3

One other option that we’ve used is to send a stringified JSON blob in a single structured event that could then be broken down into multiple data points during analysis.