Posts

Changes to Tracking Contact Form 7 Submissions

With over 3 million downloads and counting, Contact Form 7 is one of the most popular tools for creating a variety of forms on the WordPress platform. When using Contact Form 7 it’s easy to see why this plug-in has become a favorite of developers and website owners. The ease of use, flexibility, breadth of options, customization yet simplicity all combine to make up one of the most comprehensive and widely used plug-ins to date.

One of the great things about Contact Form 7 has always been the easy and effective way of tracking form completions through either a redirection to a “thank you” page or once the form is submitted or just redirecting users to a new page to encourage further action. For anyone familiar with the way that Contact Form 7 works these two settings for assigning Javascript may look very familiar:

  • on_sent_ok
  • on_submit

However, these settings are in the process of being phased out completely by the end of 2017. One of the only ways to track form submissions going forward will be to use event tracking. Luckily this is relatively simple, especially for Google Analytics users, to implement. In fact, by putting an event tracker similar to the one we suggest below, you can track form completions in much the same way as always but with even more accuracy.

The 3PRIME Solution
When adding event tracking to contact forms, there are a few checks that need to be made beforehand. The very first thing is to check to see if Google Analytics code exists in the header of your page. Without this, nothing else will work as intended. Once that is confirmed, we can get into the scripting/functionality.

We will need either to add a script to the page/template or we can find a dedicated javascript file to handle the work, which I would recommend. A common file such as a main.js or default.js, something that already exists on the page as a source. If there is no js file on the page then we would need to create one and link it, or we can go with the alternate method of just adding script to the page/footer.

Wherever you put your script, make sure there is a way to detect on click events. One common way is with jquery which exists on many sites and in many forms. If jquery is not on the site then we can either have the site start referencing jquery or make a more basic reference for a click event. Then check to see if any “document ready” code is in the js file. If not, you will need to state that this will happen when the document is ready to ensure that the script is not loaded before the form is.

Now in the template/page that has the form, find the submit button and add a class to it in the class field. it can be any name you want that fits the guidelines of a class name but for this example we will call it “contactEmail”. Once a class is set we can start referencing it in our script on document ready. IDs also work but classes are more consistent and user-friendly when used on the same or even multiple pages.

In the script we just have to make sure that the class is targeted correctly now. We can do this through testing. A common method is by using console.log for javascript to print a message to the inspector console when an event occurs. Add an “onclick” event handling function behind the “contactEmail” button class being clicked and simply put console.log(“ok”) inside it. If you click your button now, then the console should print out “ok.” If this isn’t working as intended then you will need to reevaluate your javascript/class/function as any of those could be the issue.

Once an onclick function is set and confirmed as working, simply add the google analytics event handling code inside the onclick function. A basic analytics function works like so:

  • ga(‘send’, ‘event’, { eventCategory: “”, eventAction: ‘click’, eventLabel: ””});

We are now sending a new event to Analytics to record, giving it a category, action, and label. These are important as they help discern and differentiate every action you wish to record in analytics. More details on how the code works can be found here. Putting it all together, we will get a function like this inside of our “main.js” file that is included on our site and on our contact form page.

EXAMPLE USING JQUERY
$(‘#contactEmail’).click(function (){
ga(‘send’, ‘event’, { eventCategory: ’emailclick’, eventAction: ‘click’, eventLabel: ’emailContactPage’});
});

When you click on the submit button with the “contactEmail” class at any point in time when on the page, an event should be tracked and recorded on your analytics dashboard, under the category “emailclick” and labeled as “emailContactPage”. Remember to test extensively and clear caching if your code is not saving/updating properly!

For more information and other form tracking solutions straight from Contact Form 7’s developer click here.

Panera Bread - Order Catering Online

Finding The Best eCommerce Solution for Your Catering Business

WooCommerce POS - Point of Sale IntegrationIf you’re looking to bring your catering business online, and provide ordering through your website, there are many options to consider for the best solution. 3PRIME recently started working with two local caterers to help them offer their food and platters to customers. We researched the latest technologies and came across popular platforms such as WooCommerce, Magento, Shopify, and BigCommerce. Read more

3PRIME Develops Website for Emek Security

A web partnership company specializing in design, development, and consulting, 3PRIME has been helping businesses grow and improve their online presence and operations by offering a broad and growing set of internet services and advertising for search and social media. Among its many areas of specialization, 3PRIME is proficient in helping new businesses launch websites and supporting those businesses throughout the process and beyond. It was at precisely this point in time that Bill Okwuosa was referred to 3PRIME.

Bill is the owner of Emek Security, a licensed Connecticut security company that provides corporate, event, and personal security as well as security guard training courses for the state of Connecticut security guard certifications. Emek security guards are trained as community intervention specialists, bring a trained professionalism at de-escalation in addition to the ability to effectively leverage the best practices in security services for events, as well as places of worship and business.

Bill’s official introduction to the security field occurred in 2015 when he secured his first security contract at “The Game” – Yale vs. Harvard- in November of 2015. However, his path to owning his own business training and providing security began long before that. Bill started out working as a Correctional Officer for Connecticut but that didn’t fulfill his passion for helping people. With a commitment to helping others, Bill moved into the human services field and worked at a variety of not-for-profit organizations dedicated to improving the lives of people working through difficult times. Bill also dedicated his time to improving himself, becoming certified in an array of clinical disciplines as well as continuing his formal education and earning his Master’s in Business and Organizational Leadership.

When Bill decided to expand the presence of Emek Security training and increase awareness he was starting from ground level. Bill understood that he needed to create a professional website that conveyed both his expertise and the classes offered to those looking to either begin a career in the security field or gaining more expertise and furthering their own education. Bill came to 3PRIME with his resume, some brief descriptions of his class offerings and a vision. Beyond his industry knowledge, Bill needed a partner that he could rely on to handle the technical aspects of building a website and convey his experience into meaningful website content that allows his professional knowledge and expertise to shine through. After talking with Bill, 3PRIME was able to understand and flesh out his vision and build him a brand new WordPress site.

The website showcases everything about Bill as a professional as well as all of the classes offered by Emek Security and even allows people to register and pay for classes ahead of time. 3PRIME co-owner Ryan Turner says, “ Our extensive experience working with entrepreneurs like Bill to design a website that is both professional and functional has earned us an exceptional understanding of the needs of small businesses so we can offer the right solution for each stage of their business development”.

Web Development Services

3PRIME Web Development Services

Web development can mean vastly different things, so we’ll summarize by defining it as the process of actually building a website, or web application, as opposed to the design or promotion of a website.

Building Websites

3PRIME has over a decade of experience developing websites, going back to when SHTML came on the scene and seemed revolutionary. Now we primarily build websites on the WordPress™ platform, and can provide a lot of value for a business of any size at really affordable prices.

We’d be glad to discuss what you are looking for whether its customizing a new website, or rebuilding and updating an existing one. We have the expertise to fit a plan to your needs and budget, and stand by everything we build, even years down the road.

Advance Web Development

Web development also means editing and adding onto an existing website, often by wading through the work of others to find the key to fixing something that has broken, been hacked or just become outdated. Very few companies can do this in a manner affordable to SMB/SMEs, and we are one of them.

When adding new functionality onto an existing website, it’s important to first understand the underlying system and website architecture. This is another example of where our developer experience makes all the difference. Once we have determined the manner in which the new web functionality should be built, we can retrofit your website to incorporate it, extending the life and increasing the value of your online presence.

Need a Web Developer in CT?

Give 3PRIME a call, you’ll find that we can do what needs to be done, and you’ll like working with us!

Portfolio Items