Skip to content

Switch links with onclick attribute to mousedown for Multidomain #69

@googleanalyticsresoneo

Description

@googleanalyticsresoneo

By default we have
_gas.push(['_gasMultiDomain', 'click']);

But when one of the links already has a function binded to the 'onclick' gas should try to use 'mousedown' as an alternative handler so that, for example, the link isn't opened twice

I had the case with 'onclick' doing a window.open in JS in a new window and gas opening in the current window, resulting in 2 page views, one in a new visit and the other one in the current visit....

It shouldn't be needed to change the behavior for all the links in the page, but be careful to change the default behavior when it's at risk because an existing onclick code.

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions