Matomo api HeatmapSessionRecording.testUrlMatchPages

(Patofet) #1

In the Matomo api in the function HeatmapSessionRecording.testUrlMatchPages, how can I put the correct matchPageRules?

I try this: matchPageRules[0]=[“”]
but give me this error: {“result”:“error”,“message”:“Each “Page Rule” within “” has to be an array.”}

(Peterbo) #2

You’re giving very few info on what your environment looks like. But the function expects the url and the matchingRules


matchPageRules[] = ['attribute' => 'url', 'inverted' => 0,....]

testUrlMatchPages("", matchPageRules);

(Patofet) #3

okey cool, The array should be constructed like


A lot of thanks