Plugin and javascript problem


#1

Hi,

I’m trying to use the example plugin.
I have added the disable_merged_assets = 1 option in my config file but it doesn’t load the javascript file.
I’m missing something?
If could help i’m using the last version of piwik on windows 8.1 machine with iis and webmatrix.

thanks in advance for your kind help.


(Matthieu Aubry) #2

did you enable your plugin in Settings > Plugins ?


#3

Yes of course if i go to the url i can see the hello world message but can’t see the console log message Into the console.


(Matthieu Aubry) #4

did you add the hook getJavascriptFiles ? Events - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3


#5

It’s already there if i don’t wrong.

Could be i’m missing something in twig template?


(Matthieu Aubry) #6

can you put your plugin on github and send us link here? I will take a look


#7

Yes and i will do it but it’s the same that is in the default piwik installation, i was playing around with it because i want to learn more about the piwik platform.
Anyway if i add this string: {{ includeAssets({“type”:“js”}) }} into the twig template of the plugin it works (i do it just for testing purpose) even without disable_merged_assets = 1 into the config file, but logically it loads all the javascripts.