Confluence Cloud Plugin "Google Analytics, Matomo & others" from Atlas Inc.
Asked by Martin Podhovnik:

We are currently evaluating the Atlassian Cloud Plugin "Google Analytics, Matomo \& others" ([https://marketplace.atlassian.com/apps/1218022/google-analytics-matomo-others?hosting=cloud\&tab=support](https://marketplace.atlassian.com/apps/1218022/google-analytics-matomo-others?hosting=cloud&tab=support)) -- and as our existing on-prem system is using Matomo/Google Analytics for some time, I stumbled over this plugin.

I have two questions regarding the plugin:

* Using the predefined way in the plugin of sending data to Matomo: It counts on our on-prem Matomo, but page URLs, page titles are not available in Matomo. Is there any way of getting those?
* There is also a 2nd way of implementing a tracker using custom script according to the documentation (<https://bitbucket.org/kpbogdan/analytics-info/wiki/Home>), but this gives me back 404 in the LoadScript function.

The support email address for this plugin (as well as for all other Atlas Inc. plugins) gives currently back errors when sending a mail, so asking the community is my last possibility.

Maybe some of you got this up running - or has a valid support address as the one from the Atlassian Marketplace ([support@atlasinc.ovh](mailto:support@atlasinc.ovh)) gives currently back mail delivery errors.

br

Martin


Answers:
author: Krzysztof Bogdan
body: [@Martin Podhovnik](/t5/user/viewprofilepage/user-id/4451147)

Hello,

Atlas Inc. vendor ower here.  

Indeed look like there is a problem with email (support@atlasinc.ovh).  

It should be possible to send page title and url to your instance with custom code.  
**On Monday**:

* I will fix email
* I will update docs
* I will prepare custom JS that will send page title/url and send it to you

<br />

Sorry for inconvenience and thank you for bringing this to my attention.  

Best,

Krzysztof Bogdan

comments: author: Krzysztof Bogdan
body: Hello [@Martin Podhovnik](/t5/user/viewprofilepage/user-id/4451147) ?

* I have updated email on vendor page, now I use: kbogdan@dwa.ovh.
* [Here is link to docs](https://bitbucket.org/atlas_inc/hub/wiki/Google%20Analytics,%20Matomo%20&%20more%20for%20JIRA%20and%20Confluence)

Here is example how I would send url \& page title:

(You have to fill **PIWIK_TRACKER_URL** and **SITE_ID**)

```
<script type="text/javascript">
    (function () {

        AP.getLocation(function (location) {

            pageTitle(function (title) {


            window._paq = window._paq || [];
            _paq.push(['trackPageView']);
            (function() {
                var u="${PIWIK_TRACKER_URL}";
                _paq.push(['setTrackerUrl', u+'piwik.php']);
                _paq.push(['setSiteId', '${SITE_ID}']);
                _paq.push(['setCustomUrl', location]);
                _paq.push(['setPageTitle', title]);
                var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
                g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
            })();

            });

        });


        function context(cb) {
            return AP.context.getContext(cb);
        }

        function pageId(cb) {
            return context(function (context) {
                cb(context.confluence.content.id);
            });
        }

        function pageTitle(cb) {
            return pageId(function (pageId) {
                return apReq('/rest/api/content/' + pageId, {
                    success: function (responseText) {
                        const page = JSON.parse(responseText);
                        cb(page.title);
                    }
                })
            });
        }

        function apReq(url, opts) {
            return AP.request(url, opts);
        }
    })();

</script>
```

Best,  
Krzysztof Bogdan


author: Earl McCutcheon
body: Hello [@Martin Podhovnik](/t5/user/viewprofilepage/user-id/4451147) ,

Thank you for bringing this to our attention, I have brought this up with our Marketplace team who have flagged this and are digging into the details more in the background and they have reached out to the vendor via the contact details they have for the vendors support account on record to see if we can get a response on the changes, but at this point, we will need to wait a bit for a response but we will keep you posted.

Regards,  
Earl


author: Nic Brough -Adaptavist-
body: I'm afraid it looks like the vendor has ceased trading.

I would give up on their apps and look for another that is still in business.


Tags: atl-rvw

cloud

confluence-cloud