How can Bing's Universal Event Tracking track "pages" in a pop-up? - bing

I have a site where a user can open a modal window containing a number of "pages" which are actually HTML replaced by AJAX (ie, there is only one real page). In order to make each screen look like a new thing to Google Analytics, each time the "next" button is pressed, I do this
ga('set', 'page', pagePath);
ga('send', 'pageview');
which works fine. I've been asked to add Bing tracking to the same application. The standard inclusion obviously only tracks the first page load. Is there an equivalent to the GA code for Bing?
The Bing documentation seems to suggest I should be using a custom event for this, like
window.uetq = window.uetq || [];
window.uetq.push
({ 'ec':'Event category', 'ea':'Event action', 'el':'Event label', 'ev':'Event value' });
but I only seem to be able to set up a conversion goal, and it seems wrong to make every "page" a conversion goal when, strictly speaking, only the very last one is, and I need to be able track how far through the pages the user got before they gave up.

Related

Mobile form on website is not sending on the first click of "submit"

this is kind of a weird issue I'm having with a site's form when viewed on an iPhone5. When somebody fills in the information and tries hitting submit, it refreshes the page with all of the content still on the page but none of the tasks triggering. No errors or warnings are shown. When the user clicks submit again, the form works as intended.. so the first click doesn't seem to be working.
I don't own an iPhone5, but I tried this on both Safari and on my DROID4 (which both worked fine).
The site is built with DotNetNuke version 6, ASP.net, the forms are a module called DynamicForms, though I don't know if that information is needed.
Any help is greatly appreciated.
Your best bet would be to get in touch with the good folks at Data Springs, the creators of the Dynamic Forms module. They provide really good support.
I'm not sure what triggers you have, but that sounds like the browser for the device isn't actually doing the event. As for a potential work around, in your skin but this:
$(function () {
$(".SubmitButtonAnchor").click(function () {
if(window.confirm(location.href)) {
window.location = "http://bing.com";
}
});
});
The above example should anchor to your input button and do the following:
When you Submit it will prompt you of the page it is attempting to navigate to.
The ability to say "Yes" or "No".
Then navigate to the page.
This should bypass some issues you may be experiencing currently, I'd still let them know that it isn't working as intended.

facebook page app bar like onclick next

I have a question about an app page function on Facebook.
https://www.facebook.com/InternationalDelight/app_481604621851046?ref=ts
in the link above there is the blue stick header, followed by a silver or white bar with four items.
An avitar/icon image
A button that allows a direct link to the owner's Facebook page attached to a another drop down button.
Now the last button is the one I am curious about. It allows the splash page (in the content area) to be liked then it redirects the person to the offer.
I have my app in sandbox mode, I am wondering:
Is this is an app that I can add
Is it a custom built function
A standard feature that I have not seen because my page is not live.,
How I can duplicate the functionality of the entire bar?
I have dived into Facebook the API and Facebook graph but I honestly don't know what to look for or what it is called.
On inspection the container div says...'stickeyheader' probably becasue it is sticking itself to the blue header...or timeline and 'timelineStickyHeader' and 'visible'... but how they got it to behave this way is beyond me.
Anyone familiar with this action/event? Let me know if I need to add more details.
Thanks!
Here is the answer (in case anyone bumps into this down the road). There are a few steps to putting your app on Facebook via and iFrame (basically a application that is hosted somewhere else but that requires some Facebook like button interception.
First you build your application. Creating a landing page (this will be tabbed later). In the header of that page look to intercept the user Facebook date to see if they currently like your page. If they don't then set up a function that stops them. If they like the post back/processing of the page on the like button click will set the conditions for the user to pass through to the app. This is like-gating.
Now, to develop the application you have to go to developer.facebook.com and create an account. There are two ways you can intercept the like/user date...
Here was my original code (it is in Coldfusion and Javascript):
<cfscript>
//Decode the signed request
fb_str = listToArray(FORM.signed_request, '.');
//Facebook use strtr
fb_str = replacelist(fb_str[2], "-,_", "+,/");
//For some reason their base64 needs padding out to match a base64 length
pad = repeatstring("=", 4-len(fb_str) mod 4);
//Decode it
result = ToString(BinaryDecode(fb_str & pad, 'base64'));
//JSON-ify it
liked = deserializeJSON(result);
//Clean up and release memory
fb_str = pad = result = '';
</cfscript>
<cfif liked.page.liked eq 'YES'>
<script type="text/javascript">
top.window.location = 'http://apps.facebook.com/parentsavvybook/';
</script>
</cfif>
That goes on your Coldfusion page (or other server-side scripting equivalent).
More can be found here: http://www.facebook.com/note.php?note_id=10150169691075844
Then in the developer tools you want to choose web app, then click the button that says create a new app. Fill in the application information, like what the domain is, and the name of the app.
The important stuff is the tab set up.
Add your app URL (where your web app is hosted to point to the page that has the FB script code/redirect stuff.
Once it is created you'll have an app ID and app URL.
The KEY
The key was this little stupid bit of code.
http://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL
Why was this important. Well the Facebook page might be managed by you, but you will not be able to attach it to the page. You'll go crazy for days trying to get it linked up.
Fill in the missing parts above and go to the link.
You'll be prompted with a drop-down that will let you attach it to your page, or a page you manage.
Here is another post that hits the high points.
http://blog.hubspot.com/blog/tabid/6307/bid/26330/How-to-Create-Custom-Tabs-for-Facebook-Business-Pages.aspx
I hope this helps someone who struggled with FB apps and tabs to get the like button and how to interact with it and then finally attach it.

how to customize facebook like button

I am usign the version of based on the <fb:like > tag. This renders a small facbook logo which implements the actual "like" operation, but also includes a large "signup to see what your friends like", or the number of likes when you are logged in, etc. It is pretty clear from what I have read that this is the form facebook wants you to use, but it makes the button to wide for my layout. The point is that I see other versions on websites all over, in particular "the weather channel" has one that includes only the logo with some text such as "like us" next to it. "Chicago Tribune" has one that says "recomend" with a very small like count next to it. I have not been able to determine what these link to or what script they invoke so that I can copy them. Can anyone help ?
when you get the code of the like button from facebook you can play with the options and get different results: http://developers.facebook.com/docs/reference/plugins/like/.
obviously it's limited to how facebook wants it to look like.
it is possible to change the look with css, but that's not wise since it's against their policy and you'd have to keep track with their changes.

Like button and privacy concern

I'm operating a website within the EU and nowadays there's no way without those social buttons all around (according to "them" "up there").
Recently there's a concern about the legality of this in the EU, notably the collection of user information sent to the US servers without explicit user consent.
There was a German report on golem.de, along with advice from a lawyer (sorry, German only) that it would be sufficient if the integrated like button would not automatically trigger an interaction with the US server per se, but only with user consent, i.e. manual interaction such as the click.
We currently use the official method of inclusion along with subscribing to the edge.create event to get some sense of its usage. But unfortunately this works by loading an iframe with content from Facebook, thus immediately sending data about the user without his consent, without him even clicking on it. I seek a way to avoid that.
Idea: Show a local image with a local href which starts loading the Facebook stuff only when user actually clicks on it.
The problems as I see them:
The user clicks on my DOM element and now I'd need to act like the real FB button was pressed, but how can I do that, since the real button isn't there? If I load the button, the user would see a second one, need to click again, etc. I'd need to load if off screen, fake the click, etc. Complicated and confusing.
The counter next to the likes would be missing. I'd need to find a way to get that information for the current URL (e.g. server side), smartly cache that data, and still be able to show that to the user. I have no idea where I would get that data.
Being within EU or not, law or not, since I started only recently looking into this (because my job demanded it), it got me the creeps when I realized how it really works. I'm a web paranoid, can't believe I'm alone.
Any ideas how to tackle the above problems?
For me, the ultimate solution is how the German news portal heise.de implemented it.
Unfortunately it's all in German, but their solution is to show a dummy picture before instead and allow the user to selectively allow it for the whole site. See the article in German or Google translation to English.
This created quite some user interested (German article, Google translation to English) and has already called Facebook (presumably from Germany) on the plan, as they wrote in their article, that it is against their policy to use their button in they way they did.
Update:
And now it hit Slashdot: Heise's 'Two Clicks For More Privacy' vs. Facebook
The edge.create callback doesn't include the user ID; it just notifies you of which Like button was clicked. Unless the user has given you their details some other way, there's no way to determine from Facebook who the user is from either the presence of a Like button or from the user Clicking on it.
Facebook's FAQ item about what information is collected by Facebook when users view Like buttons but don't interact with them is here: https://www.facebook.com/help/?faq=186325668085084
To answer your specific questions:
I'm not sure how to do this without it being a jarring user experience. Effectively, you're describing a solution where you want to offer Facebook Like functionality, but make the user click something first saying 'I want to see the Facebook Like buttons'
You can access the current Like count for any URL or object in the Graph API at https://graph.facebook.com/, for example, a call to https://graph.facebook.com/facebook returns the following information (in JSON format):
{
"id": "20531316728",
"name": "Facebook",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/174597_20531316728_2866555_s.jpg",
"link": "https://www.facebook.com/facebook",
"likes": 51545712,
"category": "Product/service",
"website": "http://www.facebook.com/\n",
"username": "facebook",
[...]
the likes field there isn't exactly the number which would be displayed on a Like button, but it's a good number to start from.
(The actual number on the Like button also includes other statistics, as mentioned on https://developers.facebook.com/docs/reference/plugins/like/ )

ASP.NET MVC 2: Emulating eBay Postback

Below is an image of the sections I'm talking about:
What I'm doing is very similar to eBay:
1) a form at the top for "search terms" and then a category.
2) filters on the left that a user can click to refine the search even further.
3) sorting those results.
I played with eBay a bit and it looks to me like they are posting back every time a filter (box on the left) is clicked, or when they sort the results. Do they then store a copy of all the "settings" used to display the page in the form and use that to post back on a submit click?
How can I emulate this functionality? I don't like the idea of wrapping an entire page in a form element... it seems dirty. Should I use jQuery to collect all of the user input and then somehow pass it along?
I'm not sure how eBay does it, but if it were me, I'd have some javascript object that keeps track of all the search options on the page. Each of the elements you've highlighted would fire an event that would cause my javascript object to update this information, send it via AJAX to a controller action, and update the results area with the changes.
That's a somewhat simplified version of events, but hopefully it can put you on the right track.
I've decided that the best solution is to use jQuery Ajax. Otherwise, I'd have to make sure that every peice of user input is a form element and wrap the entire page in a form tag.