Stape
Search

Monitoring feature

Published
Dec 29, 2023

Probably many people have had situations related to loss of tracking data. For example, you wanted to check the results of your Facebook campaigns and found out that you had spent all your budget and registered 0 conversions for the last few days. 

Upon investigation, it appears that the issue stems from an oversight by the developers during a recent site update. For example, they removed the GTM snippet from the website or broke the data layer purchase event.

And such a small problem can be costly, because all the time your ads are not optimized and you don't know the real ROAS of your campaigns. 

Since we at Stape have faced such situations ourselves, we have developed and added a Monitoring function to help minimize the damage from such situations.

Please be aware that this feature is currently in beta and may not function flawlessly. We are open to and appreciate any feedback or suggestions you may have. Feel free to reach out to our support team.

How does Monitoring work?

The feature is available to all Stape hosting users on Business and higher plans.

You can find this feature in your container view on Stape, under the new 'Monitoring' tab:

monitoring feature from stape

This is where you can create, edit or delete your container monitoring notifications.

Pay attention to the Settings tab - there you can add some additional email addresses that will also receive notifications.

Alert setup

Monitoring alerts works based on the container logs:

  • Access Logs

These are any incoming requests for the container. Note that for example, if a GA4 request comes in POST format, some data will not be available in the access log, including event name. We recommend using this log to track webhooks or the total number of requests to the container, for example.

  • Request Logs

Contains data on outgoing requests. This works only for tags that are developed by Stape and have the 'Always log to console' option set in the tag settings.

  • Response Logs

Contains responses from the platforms where the events were sent. This works only for tags that are developed by Stape and have the 'Always log to console' option set in the tag settings.

  • Other Logs

Any custom logs, such as those you record using the 'Logger' tag.

The notification setting specifies:

  • Domain

If this rule will work for all domains that are used in the container or only for specific ones.

  • Period

How often the conditions will be checked.

  • Conditions

Setting up conditions: event, client, platform and status code. The event will be triggered only if all conditions are met.

  • Alert trigger

Trigger conditions are triggered by the number of requests (more or less) that match the specified conditions.

Configuration examples

1. Facebook purchase events monitoring

Suppose we have an average of 50 purchases per day that are sent to Facebook and we want to get a notification if something goes wrong and only 30 or fewer Facebook purchase events per day will be tracked.

So for this you need to:

  • Make sure that on the server container you are using the Facebook CAPI tag that is developed and maintained by the Stape team.
  • Make sure the 'Always log to console' option is enabled in the tag and these changes are published.

Setting up such alert:

  • Alert name: any you wish
  • Log type: Response Log
  • Domain: choose needed
  • Period: Day

Conditions:

  • Event - matches - Purchase
  • Status code - matches - 2xx (avoid counting unaccepted events - which will also help if for some reason Facebook stops accepting your events).
  • Platform - matches - Facebook

Alert me when:

  • Is less than - 30
monitoring feature configuration from stape.io

So you will receive a notification if there are less than 30 successfully sent Facebook events in a day.

You can reduce the checkout time to 12 hours for example, but please note that in this case the notification may falsely trigger e.g. at night when there are fewer purchases organically.

2. General monitoring of container operation

Checking once a day is too long, which means you will only know about problems with the containers after 24 hours. For this purpose you can make an additional small notification for example based on a small number of Request logs for GA4 client. 

Example:

  • Log type: Access Log
  • Period: 1hr

Conditions:

  • Client - matches - GA4

Alert me when:

  • Is less than - 10
monitoring configuration by stape.io

GA4 generates quite a few requests, so as soon as you have something happen to a container (like it being accidentally removed from the site) - a notification like this will help you detect it quickly.

3. Increasing the number of unaccepted events for some platforms

It often happens that due to problems in the data layer or some variables your event is not accepted by some platform.

For example, TikTok has a requirement that the value must be a string. And for example in some events or under some conditions your value is sent as a number because of which data is not accepted and TikTok responds with error 4xx.

You can create some similar rule that will help you to quickly monitor this and then through logs to identify the problem in the future:

Monitoring feature from stape.io

The examples provided above are just the fundamental configurations for Monitoring. However, you can use this tool to customize various other formats suited to your needs. This adaptability helps minimize potential losses of marketing or analytics data due to technical failures.

Host your GTM server at Staperight now!