Google Analytics Report on Google Sheets- How to track goal completion of one goal and not all goals - google-analytics-api

Metrics: ga:goalCompletionsAll
Dimensions: ga:goalCompletionLocation
Filters: ga:goal==goal3completions
I get an error message on the above configuration. I'd like to track one particular goal from Google Analytics to Google Sheets. Can someone help?

Try this:
Metrics: ga:goal3Completions
Dimensions: ga:goalCompletionLocation
Filters: (empty)

Related

Grafana templates for Prometheus

I am trying to update the node-exporter-full Grafana dashboard with some of our internal labels as templates. We have labels for "pod" and "servertype" which can be used to get a subset of "nodes" to list at the top of the dashboard.
I can add "pod" like:
label_values(pod)
Then I can reference "pod" in the node query as follows:
label_values(node_boot_time{job="clients",pod="$pod"}, instance)
This works. If I want to add servertype in the middle how would I pull a list of "servertype" based on "pod" which is selected?
I already know the "node" can be filtered with:
label_values(node_boot_time{job="clients",pod="$pod"},servertype="$servertype", instance)
Answer was pretty simple once I reread the documentation. Using "up" function currently and it is working fine but there may be a better solution.
node_boot_time has been changed to node_boot_time_seconds
Refer to this link to get all the name changes since prometheus 0.16.0
https://github.com/prometheus/node_exporter/issues/830

Mapbox Directions Instructions in Metric

I am trying to work with the Mapbox Directions plugin. I have found no documentation for the various controls indicated in the example here:
https://www.mapbox.com/mapbox.js/example/v1.0.0/mapbox-directions/
The Inputs control doesn't work well at all so I'm using my own control and have got it to display the origin and destination markers, route highlight, and instructions using code similar to this:
var loStartLatLng = L.latLng(53.5, -113.5);
var loEndLatLng = L.latLng(53.5012, -113.5012);
var loDirections = L.mapbox.directions({
profile: 'mapbox.driving'
});
loDirections.setOrigin(loStartLatLng);
loDirections.setDestination(loEndLatLng);
loDirections.query();
var loDirectionsLayer = L.mapbox.directions.layer(loDirections).addTo(moMap);
var loDirectionsErrorsControl = L.mapbox.directions.errorsControl('divRouteErrors', loDirections);
var loDirectionsRoutesControl = L.mapbox.directions.routesControl('divAlternateRoutes', loDirections);
var loDirectionsInstructionsControl = L.mapbox.directions.instructionsControl('divRouteInstructions', loDirections);
I have not found documentation for any of the above controls. One thing I absolutely must be able to change is the instructions' units. It currently outputs in imperial/English/us units but I need to be able to toggle to metric for some customers. How can I do this?
Thanks in advance,
Tony
The documentation for mapbox-directions.js can be found in the API.md file in the repo. Keep in mind that this plugin is very much still in development and changes often (it is pre-1.0).
You are right about unit control -- it was added after the release of 0.3.0 so it does not appear in the library in the CDN right now. One of the directions team developers just told me that there will be a new release of mapbox-directions.js tomorrow (yay!) and unit control will be included!
In terms of the inputs control, it doesn't take addresses/POIs, but lat/lon pairs. In the example, you have to click on the map to set a start location and then click on it again to set a destination location. The control will automatically populate with the lat/lon pairs and return a list of directions between them.
Try: L.mapbox.directions({units: 'metric'}); I also couldn't find any documentation but looked at the repo and immediately found this push request from juni 13th.

Show orion context broker poi in map viewer

For learning porpoises I am trying to run the default map viewer set up and show the POIs stored in the orion public instance (orion.lab.fi-ware.org:1026).. but it does not work at all.
Following screenshots with the default provided configurations. It should show a bunch of Santander POIs if I understood well.
1.-Wired mashups schema:
2.- NGSI Source default settings:
3.- NGSI entity to POI default settings:
4.- Map viewer default settings:
5.- Map viewer result (No results at all :(( ):
Everything looks pretty straight forward but nothing is shown. Without understanding why it is not working I can not moving forward and work in my own implementation.
thanks in advance.
It looks to me like you have not obtained an authorization token (or you are not showing it in your question?). Without one you are not able to retrieve information from orion.lab.fi-ware.org.
One way to get a token is running this python script:
https://github.com/telefonicaid/fiware-figway/blob/master/python/get_token.py
Of course, you do need a FIWARE Lab account to get it.
The problem seems to be in the configuration of the "NGSI entity to POI". The Node, AMMS and Regulators entities provide their coordinates using the Latitud (latitude) and Longitud (longitude) attributes.
The final value for the "Coordinate attribute" setting should be: Latitud, Longitud

Getting distance between 2 markers

I would like to get the distance between 2 markers but not as a direct line, more as a real path like it goes in this plugin -
https://github.com/perliedman/leaflet-routing-machine
I didn't find anything about using this plugin in the directive: angular-leaflet-directive,
if someone can guide how to make it done, it would be very appreciated.
thanks!
I am not sure if you specifically want to use leaflet routing machine to get distances... but if you do, maybe this info can get you started:
Set up a route on your map based on this example by the leaflet routing machine author:
https://www.liedman.net/leaflet-routing-machine/tutorials/interaction/
If you look at that example, there is an array called routes. Each route has some basic statistics associated with it, generated by OSRM. You can pull them by calling for example:
routes[0].summary.totalDistance
or
routes[0].summary.totalTime
Then you can do whatever you want with them. If you dig through the code on GitHub you can see more about how the data are moved around within the plugin and why the array is arranged that way:
https://unpkg.com/leaflet-routing-machine#3.2.12/dist/leaflet-routing-machine.js

Jenkins Multi-Configuration Build - How do I specify the value of a multi-configuration axis in Email-Ext (Editable Email Notification)?

I've searched and have not found what content token that I would use to note the value of an axis that is used on a multi-configuration build for the email?
This shows up in the normal email but is a blocker for us getting to the better email notifications?
I will accept that this is in an ENV variable somewhere, but have been unable to locate it yet.
For reference
We'd typically add an axis of a label, slaves or user-defined (image below):
Then we would add values:
Those values show up in the normal email notification (note the >> to signify all axes of the multi-configuration build that passed or failed:
I can not seem to get to them in email. I've tried looking for environment specific values and I've tried ${ruby} as a content token, but have been unable to find any information on this thus far.
This was due to not selecting Trigger for each configuration in the Trigger for matrix jobs. When defining an axis like ruby, one would get ahold of it by ${ruby} or possibly ${ENV,"ruby"}.
Have you tried ${axis}?
Also, looks like env vars for axis config are exposed like this:
https://github.com/jenkinsci/jenkins/pull/701