Use facebook tracking pixel for registration success that does not redirect to success page - facebook

How do I set a facebook pixel event to track registration completion when my registration form completion redirects to my index page not to a registration success page?
Should I use a standard event or a custom event to achieve this, or, do I have to create an intermediate page that the registration form directs to and then redirects to index page?

Fire the Facebook Pixel event when the user clicks on the form submit with 'click' event listener. Standard versus Custom events is a separate issue, but I suggest sticking with Standard events where you can.
https://developers.facebook.com/docs/facebook-pixel/advanced/

Stephen, you provided too few information.
Richy is right that in your case if you can't control where your user lands after submitting the form you should use onClick event to send a pixel event. You can easily validate the form in the code of the onClick event and send it when you're sure data is according to your expectations. You can even do additional requests to your back-end to check the data.
If you can change how your web-site work you can make a landing page where you'd fire an event if all the processing went right.
If you can also easily do it on your index page by loading it with some parameter in the URL that indicates it is visited after the form was submitted. There you can have a simple JS code snipped with condition in it to fire a pixel event if URL parameter is present or do it with Google Tag manager which is even simpler.
There are a couple of good standard events you can use like Subscribe or Submit Application, review them here: https://developers.facebook.com/docs/facebook-pixel/reference#standard-events
You have countless options depending on what level of changes you can do to the site, you coding skills, CMS you use and precision you need.

Related

Track form conversions confirmation page URL is the same as the form

I'm trying to track form completions on a page where the form's URL is the same as the confirmation page.
Form Page
Does anybody know if this can be done with Google Tag Manager/Google Analytics please?
Completion page
Simply tracking clicks of the Submit button will result in false positives because sometimes people will not type the security code correctly.
Is there a tracking code of some sort that can be added to the confirmation page, so that each time it loads the count goes up one?
I'm grateful of any help you can provide.
Thanks!
You can use the built-in visibility trigger - e.g. as soon as a link element with the link back to the homepage becomes visible you let the trigger fire. Specifics depend on the CSS id or class for that link (if any, else you'd have to test the click text).
In the visibility trigger you might have to enable "listen for DOM changes" if the confirmation message is loaded per Ajax (as opposed to just have their CSS display property set to 'none'.

Capturing URL from Form Submission Tracking - Google Analytics

I'm looking to record the URL from which a form submission was sent from with Google Analytics.
Example:
Imagine domain.com. On domain.com Google Analytics (ga.js) is installed in the header.php and is on every page of the site. Similarly, in domain.com's footer.php there's the same contact form generated on every single page of the site.
Now, User 1 goes to domain.com. User 1 navigates to domain.com/page-c.html. User 1 submits a form from the footer contact form on page-c.html.
I want to know that a form was submitted from page-c.html. Or if User 2 submits from page-u.html then I know that a form was sent from page-u.html. It is not important that I know that it is User 1 or User 2. I just want to know the URL from which the form was sent.
Anyone know how to do this with Google Analytics? -- If not, maybe another analytics service?
You can use Google Tag Manager. Which can not only implement all the standard analytics capabilities but also lets you add event triggers with built-in variables. For example you'd enable the Page URL variable in GTM and add a Analytics Tag of type Event with Event Category, Action, Label being things like Contact Form, Submit, {{Page URL}} respectively. Then create a new trigger (triggers tell when to fire a tag). This trigger should be enabled always (i.e. something like PagePath contains / and be of type Form Submission. You can target it even better by saying trigger when to be when the Form ID is equal to the ID attribute of your contact form. This way you prevent conflicts with other forms triggering your event tag.
You can read extensively on Google Tag Manager here. It is a great tool to fine tune analytics and get more out of it.

displaying own like count next to like button

I have a website where the URLs have some tracking parameters that do not affect the page that is displayed i.e. the URL is of the form http://mywebsite.com/page1?tracking1=aaa&tracking2=bbb and 'tracking1' and 'tracking2' are just tracking parameters used for some other purpose and do no determine the page that is displayed. The page that is displayed is always 'http://mywebsite.com/page1' irrespective of the values of these tracking parameters.
I have included the facebook like button on my website pages and facebook treats each of these URLs, including the tracking parameters, as separate pages. I'm not able to get facebook to ignore these tracking parameters and just consider the URL without tracking parameters as a page. So, I'm storing my own like count against the actual URL (when I get a callback on the like action) and displaying it next to the like button.
Is displaying own like count next to facebook like button against their usage policy? Is there a better way to do this?
Is there any particular functional reason you're using GET (ie URL) variables to store your tracking?
If you can push them into POST instead, or use cookies or sessions for your tracking, you can simplify your URLs and Facebook should treat it as a single page.
If you have to use GET due to, for example, the links coming from external websites, you could use a pass-through URL to do your tracking, before forwarding to the main page. ie someone clicks the link to redirect?tracking1=aaa&tracking2=bbb&page=page1
And redirect, as you may have guessed, does what you need to do with your tracking before forwarding the user on to page1.

Change transition per submit tag in a form with jQuery Mobile

Is it possible that different submit tags in a form in a web site that's using jQuery Mobile (1.3.1) will trigger different transitions and/or directions?
Just to throw my towel in.
Now for the question you've asked, the answer is a YES. You can use a randomizing sequence to choose the transition at runtime and pass the URL and the transition to changePage, which will redirect you to the url you provided. More at jQM docs
Here's a demo of the randomised transitions : http://jsfiddle.net/hungerpain/fpw6B/
Now for your second question - No, you neednt have an ajax callback for this to work. When changePage is called, this is the operation which happens:
hides the current page
takes the URL you provided through your code
fetches the page through ajax (if the url provided is an external page)
appends it after the current page
shows the new page
As you can see, it doesnt necessarily need ajax.
Hope these answer your questions.

check user availability in forms in jsp

I have a jsp form which takes in user details. On submit button it goes to a jsp page where the details are entered into the database. But before that I would like to check if the username is available as soon as the user clicks the check availability button. How can this be done?
2 ways:
Just redisplay the same page after submitting the form wherein you conditionally display the validation message. This is rather trivial and already covered in the Hello World example in our Servlets wiki page.
Use Ajax to send an asynchronous HTTP request and manipulate the HTML DOM based on the response of the request. This requires a bit more in depth understanding of how websites really work and what JavaScript is. You can find some concrete examples in How to use Servlets and Ajax?
Use AJAX(Asynchronous Javascript and Xml). Its the best web2.0 technology. You can manipulate DOM based on the answer from server