Where should Adobe Analytics' non-standard variables be set within Adobe DTM? - adobe

I'm using Adobe Analytics as a tool within DTM. I had an issue which needed to have a particular variable be set to false s.useForcedLinkTracking=false; but the issue is I'm not sure of the proper place to set this in DTM? I tried within the tool set-up section for Adobe Analytics but the value was still true when the page compiled. The only place I got it to work properly was in the Adobe Analytics section within the "Custom Page Code" for a global page load rule.
So is there a proper place where variables like this should be set?
Thanks!

If Adobe is hosting your App Measurement file you can run your configuration variables (including calls to do_plugins) within the custom page code section of your Adobe Analytics tool. This is "global code" that will execute any time Adobe Analytics is loaded.
This approach also helps you consolidate calls to plugins and custom code in a single place without having to customize the App Measurement file itself.
Hope this helps.

You should place this in the custom s_code file (if you're not using a managed core library from Adobe) or in the custom page code within the tool config. Adding some console logging to see the full order of execution will help tremendously.

Related

I´m trying to use Google analytics on my genexus based application, but I run into some problems regarding the domain name property, probably

I´m trying to use Google analytics on my genexus based application, but I run into some problems regarding the domain name property, or the lack of it sometimes.
To contextualize a bit, I have an application which runs in Apache Tomcat can´t figure out a way to make Google Analytics work with it when setting it up from the genexus properties. I´ve tried to add the Google Analytics control to my masterpage and set up the properties for ir to work, but since the domain name will change based on which server is runing my webapp, I can't find a way around this.
If possible, I want to make each instalation of the webapp to generate data to a different Property on Google Analytics Control Panel, but the only way I've managed to make google analytics work with genexus is using an external .js file using the code google analytics gave me, and doing this way I can't make each application send data to a different Property.
My ideia was on the Start Event of the master page, to set the info needed like this:
GoogleAnalytics1.Code = &var1
GoogleAnalytics1.DomainName = &var2
Where &var1 and &var2 where loaded earlier in the event.
I've tried to make it work setting it up through the properties to see if I was doing something wrong in the attribuition but didn't work either. The only way I found to make it work is to write the .js file and add it to the Knowledge Base as an external file and call it in the master page Start Event.
I saw that this was improved on GX17 U10 but I haven't found any other coments on this. Also, I could not find the .js file generated by genexus when I set the Google Analytics Control in my MasterPage, my hope was to see if there is any difference in the file generated by Genexus and the file suggested by Google. Is there any way for me to find this file or some other thing I need to set it up on my Knowledge Base to make it work? I've tried to look on genexus wiki but didn't find anything there.
At the start, I thought the lack of the DomainName was the problem, but I've managed to make it work without a domain name using the static .js file, so right now I'm not so sure about what's the problem here.

Symfony 1.4 Analytics/Webmaster Tools

I have just taken over a dated but working website. What would be the best way for me to implement Google Analytics Tracking Code and Web Master tools meta tag?
A good place to add it is in the view.yml for the app (e.g. apps/frontend/config/view.yml) under the javascripts section:
default:
javascripts:
- /js/ga.js
Put the Google snippet in it's own file (e.g. ga.js), and drop it under the web/js folder. Clear the cache (symfony cc) and reload a page, and the new tracking code should be on every page.
This is a fast way to get it on every page. If you need a more robust solution, check out the sfGoogleAnalyticsPlugin - although you may have to modify it slightly for Google's newer tracking codes.

Google Analytics Receiving Data -- but no analytics in view source

My client created a website and a google analytics account. The report indicates that the account is receiving data -- and yet, when we do a view-source of the pages of the site, there is definitely absolutely no analytics code there. How is this posssible?
It is possible that the Analytics code is added via Javascript, not appearing in the "View Source" page. It is also possible for it not to appear in the inspector either.
I do not know how this happens, but I have encountered scripts that exist and run although they are not displayed in either the source page or the live DOM inspector (in Google Chrome). This happened to me while loading a PHP template containing Javascript through an Ajax request.
If you have access to the source code of your website, search the entire project for for the Analytics ID (Here's how to find it: https://support.google.com/analytics/answer/1032385?hl=en), and you'll locate your tracking code.
If your project is running on a Linux server, here's a post about how to quickly find a keyword (like the Analytics ID) in a folder: How do I find all files containing specific text on Linux?

Embed API Working with Custom Components fails to display

Google Analytics demo code at .
Logged in to Google Chrome as the owner of the Analytics Account and then navigating to that page displays my Google analytics data correctly.
I follow instructions on the page and embed the code into a simple page .
Authentication works as indicated by the displayed message: “You are logged in as: me(at)gmail.com” but there is nothing more, no graph no message.
I am reasonably certain that the page is coded correctly as I have:
Basic Dashboard (basic.html)
Multipleviews (multipleviews.html)and
Interactive Charts (ic.html)
all working and displaying correctly (they display but not styled like the demo).
Why will the page not display the graphics?
As Eike pointed out in the comments, you've simply copied and pasted the code from the demo without downloading the components to your own server. If you open up your JavaScript console, you'll notice that you have 404 errors saying the browser can't find those components. Here's a screenshot of what I see on your site:
To add those components to your site, you have a number of options. I've answered a similar question on one of the repo's Github issues, but I'll copy it here for convenience.
The built and minified versions of those components are located in the build/javascript/embed-api/components directory. You can simply download those files and add them as script tags on your page, or include them in your site's main, bundled script.
If you're using an AMD script loader like RequireJS, you can also just point to those built files as they're wrapped in a UMD wrapper.
If you're using a tool like browserify or webpack, you can npm install this repo and require the files in the src/javascript/embed-api/components directory.

How would you go about writing a custom script that grabs the Adobe or Google Analytics image request?

If I wanted to build a scraper that pings each URL on a site and stores the adobe (or Google) image request, how would I go about this? I.e. I just want something that grabs all the parameters in the URL posted to Adobe in a csv or something similar. I'm familiar with how to build simple web scrapers, but how do I grab the URL I see in for example Fiddler that contains all the variables being sent to the Analytics solution?
If I could do this I could run a script that lists all URLs with the corresponding tracking events that are being fired and it would make QAing much more manageable.
You should be able to query the DOM for the image object created by the tag request. I am more familiar with the IBM Digital Analytics (Coremetrics) platform and you can find the tag requests using accessing the following array document.cmTagCtl.cTI in the Web Console on a Coremetrics tagged page. I used this method when building a Selenium WebDriver test case and wanted to test for the analytics tags.
I don't have the equivalent for Adobe or GA at the moment since it depends in the library implementation am trying the do the same as you for GA.
Cheers,
Jamie

Resources