Stackdriver Monitoring : custom metric issue - stackdriver

I got a problem with the scalling of my custom metric in Stackdriver Monitoring. Moreover, data of my custom metric doesn't appear in the VALUE column.
I have set up a custom metric based on Cloud Composer logs, in order to retrieve data in the textPayLoad field.
My custom metric appears in Stackdriver Monitoring
I expect values of my custom metric to be at the right scale for the Y-axis.

Related

Custom Metric data not showing up in Google Analytics

Background
I am currently using Google Tag Manager to populate the Sales amount into a Custom Metric in Google Analytics. This is the code I use to push Sales amount to Google Analytics.
ga('set', 'metric2', {{salesvalue}});
Other information
My custom metric set up in Google Analytics: https://i.imgur.com/kX3aUto.png
I know that the metric is firing with the correct values since it is showing up in GA Debugger: https://i.imgur.com/lGIxCw1.png
Error
Despite the above, I do not see any information in Google Analytics: https://i.imgur.com/WtxChgY.png
Questions
Is there anything wrong with my setup? I have waited over 3 days but still no data.
By using ga('set') does it mean that if a user makes 2 separate purchases in the same session, only the latest sales figure will be reflected instead of the total of the 2 purchases?
Thank you
In your GA Debugger console, the metric2 parameter should be appearing within the pageview send data (along with all the other data being sent to GA at that time). If it is not there, you could be running into a race condition or some other technical issue. If it is there, then you'll know that it is definitely being sent to Google Analytics and something else is wrong. It should not take long to appear, and if you see any rows of data (as you did with your screenshot) the metric data would be there at that time.
Regarding your 2nd question, custom dimensions have scopes that are configured when you create them, but custom metrics simply add up. If I had a custom metric of "clicks on a button" and user clicked it 3 times in their session, the custom metric would be 3. Likewise, if your custom metric is listening for sales value, it will add up to the total value in that session.
Hope that helps at least get you some more clues as to what is wrong.

How can I add old data to a newly created metric on GCP stackdriver?

I want to create a new metric on Stackdriver and then check all the data before the metric was created based on it. Right now charts are showing only the new data. Is it possible?
E.g. I want to create a metric for API requests and then want to analyze the data based on labels I add. Right now I can do it only with the requests which are made after the metric creation, however I need the historical data too.
Stackdriver Logging does not backfill the metric from previous log entries. This is current limitation. You can find details here.

Alert on Custom metric do not fire even when the threshold is crossed

We have an application which uses Application Insights to Track the telemetry.
I have some custom metrics (say x) which i pass from the Application. The Metrics explores shows the details .
We wanted to have an alert bases on the Value of the Custom metric x.I create an Alert on the Portal by going to Alerts tab and Add metric alert.
The custom metric is shown in the dropdown of the Metric. Rest of the parameters are set.
But no alert is fired and no email notification is sent even when the condition is met.
Please help me to figure out the issue.
I tried setting various other combinations for threshold and Period, but nothing seem to have worked.
I made sure that while creating the alert the alert condition is not true.enter image description here

How to measure conversion rate of custom dimensions on Google Analytics?

I have added some custom dimensions via dataLayer (GTM). Now I'm creating reports in data studio and want to see unique purchases, revenue and conversion rate of these custom dimensions. I'm using ecommerce to track purchases. When I add one of my custom dimension as dimension and unique purchases as metric to create report, it gives me nothing. What should I do to have the report I want?
Have a look at this.
You're most likely pairing dimensions and metrics of incompatible scopes together. The scope of of the custom dimension always needs to be "wider" than the scope of the custom metric.

"There is no data for this view." in reports with custom dimensions in Measurement Protocol of Google Analytics

Our application needs to gather usage data through the Measurement Protocol of Google Analytics.
We can successfully send "appview" hits to the Google Analytics server, and get a proper response by it (a GIF image). The appview hits appear on the GA Dashboard, along with the country of origin, session duration, etc.
We also have several custom dimensions and metrics that we want track for each hit. We have set those up in the GA Admin panel with the correct scope, index and active state. We have 3 Hit-scoped dimensions, 3 User-leveled dimensions and 1 Hit-scoped metric, all set to Active state.
We send the dimensions and metrics as described in the docs at
Custom Dimensions / Metrics
attached to the hits they apply for, like so:
...&cm1*=3 <--for the metric
and
...&cd6*=15 <--for the dimensions (some dimensions have numeric values, others are text)
The problem is that those metrics and dimensions don't show up in our custom reports: the reports always say "There is no data for this view.". For example, we have a report that has one dimension and one metric, without any filters, set to "Any view". It doesn't matter if the Type of the report is Explorer, Flat Table or Map Overlay, it never shows anything.
There have been several days since the hits were received and appeared in the dashboard, but the reports are still empty. So scratch out any processing lag.
We tried sending "event" hits instead of "appview" hits - again, the hits show up in the Dashboard, but the reports are empty.
We cannot get any useful insights without using dimensions and metrics - so there is no way to get by without this.
Because of reasons too long to describe, we cannot use any of the Google-provided Analytics libraries.
Is there anything else we need to do to see data in those reports?
When using the measurement protocol you need to that the profile is not set to exclude bot and spiders.
Go to the google analytics website under the admin and the settings under the profile in question.
Beyond that check the realtime reports you should see the hits coming in. You will need to wait 24 -48 hours for data to appear in the standard reports due to data processing lag.

Resources