For example:
I try to click the right mouse button on filter parameters and select: "Open in new tab"
I can get this URL.
I searched for the keyword #goo in this URL, but it still unable to solve the filter parameters:
This URL does not describe the contents of the filter parameters, just to list the same style code as on the web page:
Example web URL.
Related
I am trying to do a simple tag that measures the amount of times an element is clicked.
I got into difficulty so I looked to find a video to help because tag manager layout had changed.
I follow the following Free tutorial on Udemy
https://www.udemy.com/google-tag-manager-advanced/
Specifically chapter 8 Button Click - which is a free chapter.
It tells me to setup the following options:
Tag Configuration:
Google Analytics
Tracking ID: {{Tracking ID}}
Track Type: Event
Category: Click
Action: Homepage CTA Button
Label: (blank)
Value: (value)
Then on the trigger:
Add a new one.
Name it - click on homepage button
Add “Just Links”
He ticked the wait for tags
The where it said “Enable this trigger when all of thee conditions are true” he selected
Page Path in the drop down menu.
Now here is where my issue is. When I do exactly the same thing, I only have the following options:
Google Analytics Settings
Page Hostname
Page Path
Page URL
Referrer
New Variable…
Now the new Variable send to to a new window which gives me the following options:
Navigation:
http referrer
URL
Page Variables:
1st-Party Cookie
Custom Javascript
Data Layer Variable
JavaScript Variable
Page Elements:
Auto-Event Variable
DOM Element
Utilities:
Constant
Custom Event
Environment Name
Google Analytics Settings
Lookup Table
Random Number
Container Data:
Container ID
Container Version Number
Debug Mode
So how do I setup the trigger to load on every page and track if someone clicks on the element with a CSS ID of menu-item-6825???
Totally lost on this one.
In your case you need:
1) Go to "Variables" menu in the sidebar.
2) Click "Configure"
3) Enable "Click Classes", "Click ID", "Click Element" variable
After this steps, you need to configure trigger and create condition: Click ID - equals - menu-item-6825. OR condition like that: Click Element - matches CSS selector - #menu-item-6825. Both conditions are doing the same thing.
I'm trying to find a way to use Google tag manager to fire a tag only when a 404 page is reached. The problem is that the 404 pages do not have "404" in the URL because there is no redirect.
For instance, if you entered:
www.example.com/ofiwefoign
This is not a page on the website, and you see the 404 page telling you that the page could not be found. However, you aren't seeing www.example.com/404.
Since the URL could be anything, I need another way to get the tag to fire. I apologize if this question seems silly, but I'm having a hard time figuring it out.
I was wondering if I could possible track by H1 or title tag, which would include "404"
Thanks!
Yes, you can grab content from the page. Here is an example (looking at document.title):
Click on the tag to go to the Edit Tag screen.
On the right, under Firing Rules click on the + Add button.
Select Create new rule.
For Rule Name, name your rule something like "404 Page".
Under Conditions select "New macro..".
For Macro Name name the macro something like "404 title tag".
For Macro Type select "Custom Javascript".
In the Custom Javascript textarea, enter the following:
function () {
return (document.title.indexOf('404')!=-1)?'true':'false';
}
This will return a string value of "true" if the title tag contains "404", or "false" if not. You didn't specify what your title tag actually looks like, so you may need to adjust this to fit what you expect your title tag to contain.
Click Save to save the macro details, and you should now see {{404 title tag}} in the dropdown back on the previous screen where you are creating the rule.
Set the operator dropdown to equals and in the text field to the right, enter in "true" (no quotes).
Click Save to save the rule.
Click Save at the bottom of the Edit Tag page to save the tag settings.
On the top-right of the tag overview page, click Publish to publish the changes, and you should be good to go.
I'm using Google Analytics via Google Tag Manager. I'm on Chrome and checking tags using Google Tag Assistant.
I've noticed that for many, if not most of the events I have tagged, the parameters will not pass through unless the link or key webpage they are clicking on opens in a new tab.
In HttpFox the result is a NS_BINDING_ERROR or something along those lines.
For example, if you visit this site, you can see there are two means of navigating to the "submit report" page - the CTA on the top right and in the main nav. I'd like to understand how the CTA performs compared to the main nav so have set up events, but the event only fires if I open the links in new tabs.
What does this error mean and what should I do about it?
To get rid of the ns binding error, have the onclick return false - Documentation Here.
In regards to the event not getting passed, I'm seeing in httpfox that the tid (on the event) is UA-34035531-[1-6]. That doesn't look quite right. How are you setting the account id?
I'm using the extjs library. I've got a blank panel and I want to load another one of my ext projects into it with an iframe. Here is my function (called from a button), "thepanel" is my blank panel.
function(button){
var div = document.getElementById('thepanel');
div.innerHTML = "<iframe src=\"../../../project2/?&type=grades&gradeitem1=40691&\"></iframe>";
}
I can see the GET request in firebug's console when I run the function and all my second project code/data all shows up in an iframe when I look a the HTML in firebug but nothing new shows up in the browser. Any ideas of what could be keeping my iframe's contents from showing
I am using MVC architecture, here is the code that declares my panel:
items:[{
xtype:'panel',
itemId:'two',
id:'thepanel',
region:'center',
}]
UPDATE: I've tried moving the iframe to the html config option of the panel instead of adding it through jquery with a button click. Again, I can see the code from the url in the iframe show up in firebug but nothing shows up in my application. Here is the code declaring my panel:
xtype:'panel',
itemId:'two',
id:'thepanel',
region:'center',
html:'<iframe src=\"../../../extjproh2/?&type=grades&gradeitem1=40691\"></iframe>',
height:400,
width:400,
Ended up using this plugin from the sencha forums:
http://www.sencha.com/forum/showthread.php?110311-iframePanel&p=943573#post943573
I have an iframe that gets loaded when i click on a tab on a page. When i use Firebug to look at the iframe on IE8, all i see is:
iframe id=tabContextFrame class=contextFrame contentEditable=inherit src=/xyz.dt?forward=show&layouttype=NoHeader&runid=1234 name=tabContextFrame url=/xyz.dt?forward=show&layouttype=NoHeader&runid=1234 scrolling=auto
and that's it.The hierarchy below the iframe can't be seen. I want to click on a link within the iframe. To find the elements within the iframe, I did a selenium.click("on the tab that loads the iframe") and then selenium.getHtmlSource(). From this source, I can at least locate my link of interest. I did a selenium.click("//span[text()='Link']") but it doesn't seem to do anything. Any ideas please?
Here is the code:
selenium.click("//span[text()='tab that loads iframe']");
Thread.sleep(5000);
selenium.selectFrame("tabContextFrame");
selenium.mouseOver("//span[text()='Link']");
selenium.mouseDown("//span[text()='Link']");
selenium.mouseUp("//span[text()='Link']");
Thread.sleep(5000);
selenium.selectFrame("null");
I'm guessing you are using Selenium 1.0. Have you looked at Selenium 2.0 and WebDriver. I found the following and it worked for me:
Q: How do I type into a contentEditable iframe? A: Assuming that the
iframe is named "foo":
driver.switchTo().frame("foo");
WebElement editable = driver.switchTo().activeElement();
editable.sendKeys("Your text here");
Sometimes this doesn't work, and this is because the iframe
doesn't have any content. On Firefox you can execute the following
before "sendKeys":
((JavascriptExecutor) driver).executeScript("document.body.innerHTML = '<br>'");
This is needed because the iframe has no content by default:
there's nothing to send keyboard input to. This method call inserts an
empty tag, which sets everything up nicely.
Remember to switch out of the frame once you're done (as all further
interactions will be with this specific frame):
driver.switchTo().defaultContent();
I found this on http://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions
Use driver.switchTo().defaultContent(); first then do your operation