How to remove URL Queries in Google Tag Manager for any tag (not only Google Analytics)? - analytics

I found a few articles and answers how to strip queries from URLs sent to Google Analytics. How about other services, like Facebook or Hotjar? Is there any way to send them clean URLs?
I aim to maximize the website visitors' privacy and to avoid accidental data leaks.

That does not depend on Google Tag Manager, but on the respective tracking tags.
It works for Google Analytics because the "location" field is explicitly set and can be overridden. Other tags might not offer this as a feature - e.g. many marketing tags infer the page location from the referrer instead of having an option to set the value. Since the referrer is sent in a http header as part of the request for the marketing pixels, it is outside the domain of GTM to manipulate.

Related

Enhanced Domains - What to Check in your Org?

As you know Salesforce is enforcing Enhanced Domains. I found from Salesforce help that:
Custom components in your org must be evaluated in order to check
whether they use domain name/static URLs
Some embedded content stored in Salesforce might no longer appear
Third-party applications can lose access to your data
Single sign-on integrations can fail
However, I'm struggling with finding out which particular Salesforce elements/configurations should be checked in order to detect potential gaps? Do you know which areas exactly can be affected and shall be evaluated (like Apex Codes, Email Templates and so on)? Is there any guide on that?
Your biggest concern should be inbound integrations. Things that log in over REST/SOAP API, get response with session id back, ignore the "url to use for all subsequent requests" and just use hardcoded url, whether it's prod or sandbox.
Look at this guy, he's victim of either enhanced domain or "disable api versions < 30" thing: The requested resource no longer exists with rest PHP. Look at these guys, they had hardcoded url: how to solve python code error (TooManyRedirects: Exceeded 30 redirects), Salesforce API via postman error INVALID_SESSION_ID.
As for stuff inside Salesforce itself - best would be to download whole project with sfdx and run a text search for your domain name (and site/community name if you have these). Email templates that use merge fields for forgot password etc should be fine, merge fields with record link should be fine... But if you manually craft email body in apex - might be a problem. A lot depends how creative the developer was. If you find getsalesforcebaseurl().toexternalform() it should still work. If it's hardcoded / read from custom setting / custom label / custom metadata it might be more fun.
If you have external apps that display pieces of salesforce (embedded live chat? some iframe with FAQ? CMS Connect) - the domain change might mean they need to be updated, both in terms of updating url and changing security rules (CSP for example)

How to solve: This URL is already in use by another Google service (Sites Google)?

I have just verified the custom URL for my Sites Google. When I want to assign it, it says, "This URL is already in use by another Google service." Meanwhile, I don't remember using the URL for any Google service. I just verified it with Google Webmasters. Anyway, I use Plesk for my domain services. Any help?
This is my site: https://sites.google.com/view/alvisyhrn/home
This is my URL: www.alvisyahrin.com
Your help will be much appreciated.
Thank you.
I use Google Domains but was running into the same error message. This post suggests creating and then deleting a synthetic redirect record (e.g. www.alvisyahrin.com -> http://google.com) in Google Domains. This displayed a "All resource records in this synthetic record will be deleted." message before deleting, and seems to have done the trick, since as soon as I deleted the synthetic record Sites was willing to use it as a custom domain.
I realize you're using a different registrar for your domain, but visiting your site now it looks like you managed to get things working (I assume by doing something like this). Hopefully this will be a helpful breadcrumb for Google Domains users that run into this, at least.

How to exclude traffic from specific URL

I want to disable tracking traffic data for https://www.example.com/something?utm_source=something
How can I achieve this? I only found a way to exclude parameters, but this is not what I need. (https://piwik.org/faq/how-to/faq_81/)
For example when you have a website with a URL of “example.com”, by default Matomo (Piwik) will track all requests for this website, even those requests for Page URLs that do not belong to “example.com”. If you add the JavaScript tracking code on pages of “another-website.com”, these requests will be tracked in your website “example.com” in Matomo.
It is possible to configure your website in Matomo (Piwik) so that only requests to “example.com” will be tracked, and all other requests ignored. Go to Administration > Websites > click “Edit”. Below the “URLs” field for your website, there is a checkbox “Only track visits and actions when the action URL starts with one of the above URLs.”. If you click this checkbox, and click “Save”, Matomo will then only track requests where the domain and the path is an exact match of one of the URLs you specified for this website. This means each valid subdomain has to be specified separately. For example when the known URLs are ‘http://example.com/path’ and ‘http://good.example.com’, tracking requests for ‘http://example.com/otherpath’ and ‘http://bad.example.com’ are ignored.
from: https://matomo.org/faq/how-to/faq_21077/

Google app add attachment option to email

I want to create a google app that will let you add a file from a cloud service as an attachment to an email. From reading the google documentations it seems like you can't do anything while the user is creating an email, but the attachments.me app is able to do it. When composing an email, their app will pop up a button next to the regular attachment app letting you select an attachment from the cloud. I am new to working with google apps and I do not understand how attachments.me is able to do this. If anyone has an idea as to how this is possible please let me know, thanks.
To add features to the GMail UI you'd probably have to implement this as a Chrome extension (and/or Firefox or IE extension to support those browsers). In fact, this is apparently how attachments.me does it.
What the extension does is load when you go to gmail.com, identify a place in the UI where it wants to add its button(s), and inject them using JavaScript. You may then want to use JavaScript again to do something like add a link to the text of the email before it gets sent to the media you want to attach from the cloud, or intercept the "Send" button to tell your server to send the message with the cloud attachment included (assuming the user has authorized your server to send as them -- this can have serious security implications)
Beware, modifying complex web app UIs like GMail's using a Chrome extension can be very difficult; GMail may make changes that break your UI or functionality, and they may do it whenever they want, or only to a subset of users, so you'll have to constantly keep up with these changes to fix bugs. All in all I don't recommend it as a way of adding attachments to emails.

How to add the user name in the url for a Chrome extension?

I am working on a chrome bookmarking extension with google app engine as the backend. I am the only user now but I thought that if in the future there are other users the url needs to include the user name for the extension to interact with the backend. So I was thinking to change
http://ting-1.appspot.com/useradminpage
to
http://ting-1.appspot.com/user_name/useradminpage
where "user_name" is the gmail user id.
But I looked at twitter url and I see that they have
http://twitter.com/#!/user_name/
What is the purpose of "#!"? Is my scheme good enough in this case?
The # in a URL signifies the 'fragment identifier'. Historically this has been used to identify a part of a document identified by an 'anchor' tag, but recently webapp developers have begun to use it to pass information about the page state to Javascript code running in the page. This is used because it's possible for Javascript code to modify the fragment of the current page without causing the page to reload - meaning it can update as you browse through the webapp, and go right back to where you were when you reload the page.
The fragment is not sent to the server when the browser loads a page, so Twitter's server just sees a request for twitter.com; it's up to the Javascript code in the page to examine the fragment and determine what to do after that.
In your particular case, assuming you're using the App Engine User service to authenticate users, you have a number of options for how to distinguish users in your URLs:
Use their email address. In theory this can change, and users may not want their address in a URL they will share. If the URLs are private, this is more or less a moot point.
Use their user_id. This is opaque and reveals no useful information about the user, so it's safe, but it's also meaningless and hard to remember.
Let users pick a nickname for their URLs, like Facebook and other services do, on a first-in, first-served basis.

Resources