Problem/Motivation

Hello,

I have installed TACJS and activated the ‘Piano Analytics’ service.

I would like to use the ‘pa’ object to set up a tracking plan on the site (page.display, click, etc.).

However, my JS does not recognise ‘pa is not defined’.

I have tried several things:

‘dependencies’ ‘tacjs/tarteaucitron.js’ in my libraries.yml

(function ($, Drupal, tarteaucitron) {})(jQuery, Drupal, tarteaucitron); in my JS (tarteaucitron is not defined)

Changing the weight of my JS file in libraries.yml

Drupal.behaviors in my JS file

Has anyone managed to get Piano Analytics to work with TACJS?

Comments

miki_mike created an issue. See original summary.

mably’s picture

You can give a try to this module:
https://www.drupal.org/project/tacjs_pianoanalytics

miki_mike’s picture

Hello,

I use these modules : https://www.drupal.org/project/pianoanalytics and https://www.drupal.org/project/tacjs_pianoanalytics

This fixes my problem with retrieving my ‘pa’ object.

Here, this object can be retrieved as follows: window.pa

Thanks @mably

mably’s picture

Status: Active » Fixed

You're welcome.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.