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]=[“https://www.cadena3.com&sampleLimit”]
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

//Pseudocode
|matchPageRules[0][attribute]|url|
|matchPageRules[0][inverted]|0|
|matchPageRules[0][type]|equals_simple|
|matchPageRules[0][value]|https://www.cadena3.com/|

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

testUrlMatchPages("https://www.cadena3.com/test", matchPageRules);

(Patofet) #3

okey cool, The array should be constructed like

&matchPageRules[0][attribute]=url&matchPageRules[0][type]=equals_simple&matchPageRules[0][value]=http://example.com&matchPageRules[0][inverted]=0

A lot of thanks