Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support trackSiteSearch with mtm.push #569

Open
Chardonneaur opened this issue Nov 9, 2022 · 11 comments
Open

Support trackSiteSearch with mtm.push #569

Chardonneaur opened this issue Nov 9, 2022 · 11 comments
Labels
Enhancement New feature or request

Comments

@Chardonneaur
Copy link
Contributor

Hello,
it is currently not possible to support the trackSiteSearch with mtm.push.
Is there any development planned about it?

Best regards,

@Chardonneaur Chardonneaur added the Enhancement New feature or request label Nov 9, 2022
@sgiehl
Copy link
Member

sgiehl commented Nov 9, 2022

@Chardonneaur Is this a tagmanager related request?

@Chardonneaur
Copy link
Contributor Author

@sgiehl maybe it is more a documentation question. In fact, the differences between paq.push and mtm.push is not clear. Is mtm.push only tag manager related or can it be used with any other methods and will substitute all paq.push methods? My clients are saying that mtm.push work for most cases but not for the track site search.

@sgiehl
Copy link
Member

sgiehl commented Nov 10, 2022

I'd say mtm is only tag manager. I'll move the issue there, maybe someone with more tagmanager know how can answer that.

@sgiehl sgiehl transferred this issue from matomo-org/matomo Nov 10, 2022
@snake14
Copy link
Contributor

snake14 commented Nov 10, 2022

I wonder if this could potentially be related to an issue where _paq.push doesn't always work right with MTM. I don't think that trackSiteSearch will work with _mtm.push, but it should work with _paq.push while using our tag manager. If it doesn't, it would be related to that existing issue. Anything to add @AltamashShaikh ?

@AltamashShaikh
Copy link
Contributor

@snake14 You are correct, we might need to create an additional tag/option in the existing code to support it or _paq.push(['trackSiteSearch'keyword, category, searchCount]) can be executed as a custom HTML tag with a combination of Custom Variable having the other required params.

@tomper00
Copy link
Contributor

I might have time look into a pull request for this next week.
My suggestion is to add trackSiteSearch as an option in the Matomo Tag as mentioned here:
#570

Regarding the implementation the documentation for search suggests you do not track page views when you track search.
I can see the point from an analytics perspective, but are there any other things to think about there from a more technical perspective?

@AltamashShaikh
Copy link
Contributor

cc @mattab for your view on this

@tomper00
Copy link
Contributor

I just added some code that adds search tracking to the Matomo Tag
#575
@mattab

@Chardonneaur
Copy link
Contributor Author

@tomper00 honestly, if you make it pass, for sure, I would like to interview you for my book dealing with this part.

@tomper00
Copy link
Contributor

@Chardonneaur it definitely needs some documentation, since everything is kind of connected :)

@Chardonneaur
Copy link
Contributor Author

@tomper00 I would be very interested into. In fact, so far, contributing thanks to translation, I get it, contributing thanks to developing, I get it. But now, how to contribute by coding to an existing plugin... question mark for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants