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

group webpages based on regexp #23

Open
dandumit opened this issue Jan 30, 2018 · 1 comment
Open

group webpages based on regexp #23

dandumit opened this issue Jan 30, 2018 · 1 comment

Comments

@dandumit
Copy link

Hi,
Clickheat it's used especially to optimize eCommerce sites.
Most of those are using "Friendly URL's" that in fact are pointing to 2 main templates for : product pages and for product categories.
For example for prestashop default config is / can be found by following regexp's

  • default category : /([0-9]+)-([_a-zA-Z0-9\pL\pS-]*)$
  • product page : /(([_a-zA-Z0-9-\pL])/)?([0-9]+)-([_a-zA-Z0-9\pL\pS-]).html$

I consider very usefull functionality to group webpages using a regexp rule.

Thank you for this beatifull functionality !
Daniel

@dugwood
Copy link
Owner

dugwood commented Jan 30, 2018

Hello Daniel,

For now it's impossible, as ClickHeat doesn't keep the full URL. But you can create a clickHeatGroup that matches what you want. For example, if you just want to group category against product page, ignoring category/product's unique identifier, you may do as follow:

clickHeatGroup = document.location.href.indexOf('.html') === -1 ? 'category' : 'product';

This would check if the URL contains .html, if so it's a product, else a category.

I don't know exactly how it's configured, but you have some idea of what you need to do.

Implementing regexp could be done in a future release, but it must be computed once and for all, as it may be too heavy to do this on each map creation. I'll see when database support is added.

Regards,
Yvan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants