How to attach tracking code to anchored link for an email newsletter while retaining scroll to view? - analytics

I'm trying to figure out how to attach a tracking code to a link and still keep the anchor functional. This will be used in an email newsletter.
ex:
www.example.com/welcome#Intro so that link would scroll down to the intro section right?
now if I were to do the same thing but like this www.example.com/welcome#Intro?TrackingCode the scroll no longer works.
I tried to google it but I couldn't find anything, any suggestions?
thanks for your time!

Don't think you can track scrolls. The images load top to bottom. We can't use anything like lazy load as JavaScripts don't work in emails unless it's viewed in the browser. If you want to use on browser then you can use jQuery to do that.

Related

I'm having trouble with the layout in tablet and mobile views on my portfolio and elements aren't displaying properly

I'm hoping someone can help direct me with troubleshooting for my portfolio page. I'm currently having issues with a few things and I'm not sure why or how to deal with them. Whenever I try to view them in tablet/mobile views on the deployed link the layout is completely different than when I run a live server with npm start.
The first issue about section in mobile and tablet views displays each paragraph in columns and the black background doesn't cover all of the text or the image.
The second issue is the contact page doesn't display the links on mobile even though the text color is set to black and the contact header doesn't show up on the page.
It was made in React. Below will be the deployed link and link to the github.
https://refactored-potato.netlify.app/
https://github.com/GSometimes/refactored-potato
I would really appreciate any help or guidance on sorting this out.
Thank you.
first piece of advice is that you have used TOO MUCH CSS, please use only what you really need. You don't need every css property to use on every element.
Your text/paragraphs are showing in column as their parent's display style is set first as inline and then flex. Either don't use it or write display: block

Google Analytics not tracking pages

So i'm using GA to track the pages my users visit. Unfortunately, it's only giving me the main page back. I definitely have more than one page on my website.
I think it's because i'm using React (and only have 1 index.html file) but i'm not sure how to fix this. Thanks!
What you can do is attach google analytics to DIV's and other things. What i suggest is to attach GA to other parts of your apps for better tracking
Please see this S.O. question for attaching to a div: To track clicks on a div using google analytics
If you have a GTM installed on your website it's possible to use a History change tag that has been created for such cases.
It fires every time an URL changes, even if a page doesn't reload completely. So that every time a user visits a new page (with new URL), this tag will send a pageview to GA.
if your site is single page application then you will run into this case. You will have to detect the page change by some callbacks and then trigger page view manually. Uladislau Khatskevich thought is correct history change event can be used for it, if GTM is used. History change event will help you in detecting when the page is changed. If GTM is not used then you have to provide a callback when page change

How do I get my button to redirect to a web page within the app?

So far, I have it so that when a user presses a button, a browser opens and redirects the user to my desired url. However, I want this to happen within the app instead of a web tab. How can I do this?
Use the BrowserComponent, just add it to the center of a border layout form and set the URL for that component. Check out the list of main components in Codename One within the developer guide.
Define a xml layout containing a widget called webview. Then in your activity you implement a listener to your button which invokes that xml with the desired page to load inside your webview. Google to find some code and return here with your code problems, if you find some. If this will be the case, open new questions provinding detailed info about your matters then we can help more. Best.
EDIT: Excuse me, just now, re-reading your question I think I really understand it, and the solution is very simple, just a line of code (to instruct your app to open a webpage inside your webview, and not the regular browser, outside your app). Try this:
wv = (WebView) findViewById(R.id.myWebView);
wv.setWebViewClient(new WebViewClient()); // needed to open url inside our webview, otherwise it will open at the default browser
wv.loadUrl(url);

Angular and Google tag manager (GTM) gtm.click

I am running into a problem, and I cannot seem to find a fix for it. The situation is as follows the marketing department wants to integrate GTM. Which is fine as they want to have full control over the different third party providers they wish to integrate. But for this to happen they would like to have the ability to track all clicks on a page.
And they came back to me that currently no click events are being tracked with the current configuration within GTM. At first the thought was that events were not propagating (bubbling) upwards. But having tested this myself by binding a event listener to the document (click) (see below) all div, buttons etc. with an ng-click directives did reach this handler without problems.
document.addEventListener("click", function(event){
console.dir(event.target);
});
So my assumption was that there was something wrong with the configuration but after looking at the configuration (one I created myself which looks as follows):
I still could not get it to work. Buttons that already use angulartics - https://luisfarzati.github.io/angulartics/ to send an event to the GTM container work as expected:
Download
Only the catch all click events (or any filter on it like purely looking at button clicks) does not. Now after looking at it a little more it seems GTM expects the gtm.click _event to happen. But I can't figure out (gazing through the gtm.js file) how they bind to all click events within the document (there is a click binding on the document after initialization but I am unsure if this is GTM or something from angular). And even if so I have placed many breakpoints within this file which seemingly could be related to it but none of them triggered when something was clicked.
So my question is, has anybody got experience combining angularjs with angulartics and GTM while having it catch all click/touch/mousedown etc. events and send these to GTM?
Make sure that you pusblished GTM container after you made some changes. Use "Publish Now" or "Preview and Debug" buttons inside of GTM interface(top-right corner).
Because according to your tag config this tag should fire every time when user clicks something on the website.
Regarding to "gtm.click" - this GTM-event will fire every time, when user clicks something on the website.
On the screenshot you may see, how it looks like in GTM debug mode("Preview and Debug") when user clicking on somethig at web-page, when GTM click listener turned on(like in your tag).
May be some relevant articles from my website about tracking of buttons/links on GTM will help you too:
http://konygin.net/gtm/tracking-links-en/
http://konygin.net/gtm/tracking-buttons-en/
My problem turned out to be that the person (from marketing) who gave me the html GTM tags (noscript / script) did not copy it properly (or something went wrong when it was pasted within JIRA). And after I copied it directly (having gotten access to the GTM admin panel) it worked as I would expect it to work.
Seeing as I debugged it by trying to only have one index.html with purely a button in it. Even at that point the tracker did not work and I became suspicious why that was happening as there was no angular code any more that could cause the problems.
Lesson learned, next time copy code yourself when you need it to make sure it does not get corrupted along the way :/

DotNetNuke edit navigation bar

Is there a decent way in DNN 7 to modify the navigation block at the top? I am completely lost.
I am using the "Awesome Cycles" content as a template for a class project. All I am trying to do is change out the word "us" in the navigation at the top for the word "me".
I'm sure there must be an easy way to do it, but I don't think I "speak the language" well enough to google this. I have been literally searching for three days, and I know I'm going to feel stupid once someone points it out but... Oh well.
Thanks in advance!
You are correct that you can simple change the Page Name in the page settings to control what displays in the Navigation. But be aware that changing a page name also changes the URL of that page.
Check out this video for how to avoid bad URLs after changing pages
http://www.dotnetnuke.com/Resources/Video-Library/Viewer/Video/213/View/Details/Renaming-a-Page-in-DotNetNuke.aspx
tl;dr - create a new page, with the old name, make it hidden (not in the menu), and have it redirect to the new page.

Resources