question

MaraLuzMicozzi-8743 avatar image
1 Vote"
MaraLuzMicozzi-8743 asked NikOsvalds-7542 answered

Azure API Management - Developer Portal - Google analytics

Hi, Can I add google analytics on my developer portal? (Azure API Management) Thanks on advance.

azure-api-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered PramodValavala-MSFT commented

@MaraLuzMicozzi-8743 The APIM Developer Portal has built-in support for Google Tag Manager for both managed and self-hosted portals. The official doc for the same covers step required for setting things up for both.

For more customized integration, you would have to self-host with your own implementation as required.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MaraLuzMicozzi-8743 Apologies for not getting back sooner. The configuration for the Developer Portal is hosted on the APIM Management REST API. The request required here is as follows

GET https://<apim-resource-name>.management.azure-api.net/subscriptions/000/resourceGroups/000/providers/Microsoft.ApiManagement/service/integration-common/contentTypes/document/contentItems/configuration?api-version=2019-12-01

Authorization: <shared-access-signature>

The shared access signature can be generated as shown in the docs.


1 Vote 1 ·
NikOsvalds-7542 avatar image
0 Votes"
NikOsvalds-7542 answered

There are detailed instructions available in the Microsoft docs:

https://docs.microsoft.com/en-us/azure/api-management/developer-portal-integrate-google-tag-manager

There is also a node/cli script you can use if you don't want to mess with the management API:
https://github.com/Azure/api-management-developer-portal/blob/master/scripts.v3/gtm.js

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.