Delay between multiple tags at same time

Hi there.
I have a redirect site with a lot information that I add into custom dimensions.
Two of this values are something like puchasing cost and selling cost. Both of them are needed.
As well we need to check the default pageview.

We should calculate with theese both costvalues, therefor we made them as goals.
The problem for us is now, our custom trigger has three tags and not all of them are thrown every time.
The reason is, that this three tags are not thrown at the same time. By set priority in tags, the order is allways the same. Goal One, Goal Two, Pageevent
But it needs a lot of time as you can see here:

Between the first and the second Goal is a gap of one second !
This is a big problem for us cause some users close the side here or go back. Especially if they have poor internet. So we often get only one goal and loose the other.

As it is not possible to send both costs as one goal or send the costs as normal values, we have to send them as quick as possible.

What can I do? I don’t understand, why there is such a big gap.

regards Pascal

Hi Pascal!

Could you specify more about the goals you’re talking about? How are they set up? When do they trigger?

Sure.
We have two goals:

  • cost_out
  • cost_in
    both are setup to track goal manually multiple goals per session. default revenue is 0

In Tagmanager we have a tag for every goal. So they have the goal id and the revenue comes by a variable (custom JS). There is a short ifelse in it and it reads out a variable cost1 / cost2 in our datalayer.
they also have about 50 custom dimensions
the tags run forever and all day
The tags are async tags and priorized (there are no sync tags and only theese two tags are priorized)

The we have a trigger “track_costs” that is a data layer event. It is used to our two goals and is listening if eventname in datalayer contains “track_costs” on all events.

In our javascript we have loading the piwik tag snippet
then we push stuff in our datalayer
then we do a little check and then we push event: 'track_costs' to datalayer.

So it is like this:

  1. event is in datalayer
  2. event triggers goaltags and they get their revenue and dimensions

I hope it will help you,
Pascal

Could you send me a private message with the URL of your instance? We will check your issue more closely

Did you observe any data loss or goals not being tracked properly? Or is the issue just the timing? Both goal tracking tags are fired on this redirect page which is shown just for a moment (max few seconds) after which the visitor is redirect to the selected job offer, and while testing, both tags were always firing.

yes, we had a few situations where only the first goal is fired.
If the internet is slow, like 3G or so, I can reproduce this (I emulate it).

In my develop environment I can shut off the redirect, so I know it is not so easy to check it if the redirect starts directly

Hi again! I have some updates on this topic:

We’ve noticed that you have a lot of variables in these tags. For the tags to be rendered we need to replace all variables references with the actual values of the variables, which is not instant. That’s why you may notice some delays.

That difference in time is not strictly related to the network connection speed,it is rather a matter of compute resources, the faster the device, the faster the code execution.
On the other hand, slower network connection is usually attributed to mobile devices which in turn often times have lower compute resources.

The issue is a combination of the above and tags firing on the redirect page that may be quickly reloaded.

There are a few options for you:
→ You can manipulate the redirect time (introduce a fixed, controlled timeout before redirect occurs) to give tags enough time not only to fire (be rendered) but also to finish their code execution
→ Review the custom variables used in the tags and check if they are all needed (with the aim to decrease the amount of variables replacements)
→ Re-consider firing the tag on the redirect page (that requires checking if you have all the data required for the tag on the page before the redirect)

Thank you for your patience! :smiling_face: