Add Custom hitCallback Functionality#13
Open
timdmackey wants to merge 1 commit into
Open
Conversation
* Add Custom hitCallback Functionality (https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits#hitcallback) * Fix typo in TRACKING_ID variable name (was “TACKING_ID”) * German and Spanish translations still needed for new parameters in de.yaml / es.yaml
Owner
|
Looks good! Thanks! It'd be nice to document that in the README.md too. Do you think you could add the notes about this new option there? |
Author
|
Sure, I will try to get to that soon. Do you think someone will be able to
translate those couple of lines for me?
Also, I was thinking it might be better if I split out the variable typo
correction into a separate pull request to keep things more organized.
Thoughts?
…On Mon, May 29, 2017 at 11:46 PM, John Linhart ***@***.***> wrote:
Looks good! Thanks! It'd be nice to document that in the README.md too. Do
you think you could add the notes about this new option there?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALJ9H-fVuZvTwNYLfg04UjSaHsFpQfuks5r-7szgaJpZM4NoD9P>
.
|
Owner
|
Just leave those translations in English without any note about needing a translation. When someone speaking the language be willing to translate those, he can create a PR with the change. But the note will make the UX worse until it happens. Yes, I'm all for it. The smaller and focused the PR the better. |
Owner
|
This PR needs 2 simple things:
@timdmackey Please let me know whether you will be able to get to it. If not, I will close this PR. |
Collaborator
|
@timdmackey will you be willing to update this for GA4? This doesn't work at the moment because in GA4 one needs to use event_callbacks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added the ability for myself to include a custom hitCallback function in my analytics tracking code, and thought that it might be useful to some other people. This patch adds a new form field to the admin, and if the user has entered their own custom callback function, it will be included on the analytics pageview send.
I also took the liberty of correcting a typo in the "TRACKING_ID" variable name (was “TACKING_ID”). German and Spanish translations are still needed for new parameters in de.yaml / es.yaml, I just put in the English text with a note and hopefully someone can translate it.
As an example of what this functionality is useful for, I use the callback to remove my google utm parameters from the url after the page landing has been tracked, giving the user a much cleaner url to look at and to possibly bookmark: