Fetch reporting metrics from interaction
Overview¶
In this tutorial we will be fetching all metrics from an IB report. We will use a small example of an interaction.
Note
You will need the element-id
for the Actions metrics. The rest of the metrics make use of the interaction UUID.
To find the specific identifier for the views in interaction builder, you can either:
- Check elements in IB report with the web inspector;
- Check elements in IB with the web inspector;
- Use the JS Console in IB with
store.widgetEditor.currentViewUid
to get the current view.
To find the interaction UUID you can go to IB under the menu of the interaction name, there you’ll find a field that says: Interaction ID
or it can be found in the url.
Prerequisites¶
A guide on how to create an API token can be found here
Once you have obtained your API token(s), define the Authorization HTTP header for all your API requests:
1 |
|
You should replace the
<api_key>
with your API token
Remember that the api token is connected to the user that created the token, which means that if the user is deleted the api token will also be invalidated. You can create an extra user and create the token with this user, remember to name the user so that it doesn’t get deleted by mistake e.g “Reporting api-user do not delete”
Which metrics can I request?¶
giosg has multiple metrics that are used in the interaction builder report, these are:
Metrics¶
Views¶
The following query can be made to fetch the viewed metrics per interaction view. You will need to change the <organization_id>
and <interaction_id>
with the respective UUIDs of your organization & interaction.
Request URL: POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
Interacted¶
The following query can be made to fetch the interacted metrics per interaction view. You will need to change the <organization_id>
and <interaction_id>
with the respective UUIDs of your organization & interaction.
Request URL: POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Missed (Exits)¶
The following query can be made to fetch the missed metrics per interaction view. You will need to change the <organization_id>
and <interaction_id>
with the respective UUIDs of your organization & interaction.
Request URL: POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
Actions¶
The following query can be made to fetch the action metrics per action. An action is for instance a button click. You will need to change the <organization_id>
and <interaction_id>
with the respective UUIDs of your organization & interaction.
Request URL: POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Goals¶
The following query can be made to fetch the goal hit per interaction view. You will need to change the <organization_id>
and <interaction_id>
with the respective UUIDs of your organization & interaction.
Request URL: POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Conclusion¶
In this tutorial we have learnt how to request information from Giosg Reporting, and got some metrics that can be used further by your own IT in your own products or reports.
Endpoints used in this tutorial¶
POST https://service.giosg.com/api/events/v2/orgs/<organization_id>/fetch