How to use a TikTok Pixel to track WordPress form submissions

How to Use a TikTok Pixel to Track WordPress Form Submissions

Would you like to use a TikTok Pixel to track users who submit a form on your WordPress website?

When users come to your website from TikTok and submit a form, this is a strong signal of buying intent. If they don’t follow up on this, you might be able to get them to do so by retargeting them.

But retargeting only works if you know who exactly to target. Installing the TikTok Pixel will help.

Here’s how to set it up!

What Is the Pixel for TikTok?

The TikTok Pixel is a piece of JavaScript code that you install on your website to track users who visit your website by clicking through a link on TikTok or a TikTok ad.

The Pixel is very accurate at tracking users and events such as sales or form submissions and providing you with data you can use to create highly targeted TikTok ads.

You’ll need to generate a specific Pixel for your site, which you’ll paste into the head of your site. This can get fairly technical, but the tools we’ll be using can be used by users of all skill levels.

How to Use a TikTok Pixel to Track WordPress Form Submissions

Step 1. Install WPForms, WP Code & AIOSEO

To embed a TikTok Pixel on your site, we’re going to need a few helpful tools. First is WPForms, the most popular WordPress form builder.

WPForms pricing

We’ll also need WPCode, which is an excellent tool for adding code to WordPress sites.

WPCode

Finally, we’ll install AIOSEO, the leading WordPress SEO plugin. AIOSEO will come in handy when we create a thank you page shortly.

All in One SEO : home page

If you need some help with installing these plugins, take a look at this guide to installing WordPress plugins for beginners.

Once you have all the plugins installed, we can get on with creating a contact form and tracking submissions with a TikTok Pixel.

Step 2. Create a Simple Contact Form

Creating a form with WPForms is super easy. There are 2,000+ form templates to choose from, and if you decide to build one from scratch, you’ll find the drag-and-drop form builder extremely easy to use.

To get started, head into the WordPress admin area. On the left sidebar, click on WPForms » Add New.

Adding a new form in WPForms

This will open up the WPForms template library. For this guide, we just need a simple contact form, but you can choose any of the form templates that suit you.

Simple contact form

Give your form a name and save it.

Name your form

For the next step, we’ll hop away from the form builder, but you can keep it open in a separate tab, as we’ll be right back.

Create a Thank You Page for Form Submissions

There’s a default thank you message that shows when a user submits any WPForms form. When we’re working with the TikTok pixel, we’ll need a slightly different setup.

The TikTok Pixel needs a way of identifying when the form is submitted. We’ll need to create a separate form submission confirmation page, and when this page loads, this will count as a completed event to the Pixel.

So, at this point, the next step will be creating a dedicated form submission confirmation page on our site. To create a new page, simply hover over Pages on the left sidebar in the admin area, and click Add New.

Add new WordPress page

Give the page a name and type in a thank you message. The most important thing to do here is create a unique slug for the page. One the right sidebar on the page, you’ll see a section labeled Permalink.

Right below it, you’ll see the URL slug for the page. The slug is a pretty important part of how the Pixel will track form submissions, so be sure to set it to something unique and simple, like thank-you.

Form submission thank you page

Another important thing to do here is make sure users don’t stumble on the confirmation page through search engines. We’ll need AIOSEO for this. If you’ve installed the plugin, you’ll see an AIOSEO module when you scroll down below the content area in the page editor.

Click on Advanced and navigate to the Robots Setting section. Tick the No Index checkbox to discourage search engines from indexing this page.

Noindex your form confirmation page

With these settings in place, we can now publish our page.

Publish your thank you page

Once you’ve saved the page, we can now head back into the form settings for the form we created in the previous step. We’re going to configure the form to redirect to this page when a user submits an entry.

Configure the Form Confirmations Settings

If you left the form builder after creating your form, you can get back here by clicking through WPForms » All Forms. You’ll see all the forms you have on your site. Simply click the one you’re looking for to get back into the form builder.

Once in, we need to head over to the form settings using the menu on the left sidebar. Click through Settings » Confirmations. You will see that your confirmation type will be set to Message.

Confirmation message settings

You’ll want to click on the dropdown to change this to Show Page and then select the name of the confirmation page we just created.

Confirmations settings set to page

At this point, we’ve got a functional WPForms form that’s ready for tracking. The next step will be creating a TikTok pixel to track TikTok users who submit this form.

Step 3. Create a TikTok Pixel

If you don’t already have a TikTok Business account, that’s where we’ll get started. Once you’ve signed up, log in and click through Assets » Events.

TikTok assets events

You’ll be prompted to choose between tracking app Events and Web Events. Choose Web Events since we’ll be tracking events on your site.

Manage web events

Then click Create Pixel.

Create pixel

Give your Pixel a name of your choosing, then under connection method, choose TikTok Pixel.

Choose TikTok pixel

On the next page, you’ll be offered a number of installation options. Click Manually Install Pixel Code and then click Next to get the code that we need.

Manually install Pixel code

On the next page, click on Event Builder.

Event builder

You’ll now see the Pixel code: a piece of JavaScript code that we’ll paste into the head of your website. Copy the Pixel code.

Copy Pixel code

If you’re a beginner to working with code, you don’t have to worry at all. If you followed the steps in Step 1, you’ll have installed WPCode to take care of all the heavy lifting.

Just copy the code, and let’s head back into WordPress. But don’t close the TikTok ads manager tab, as we’ll need to come right back in the next step.

Step 4. Add TikTok Pixel to WordPress

You can add your newly created Pixel to WordPress manually using the WordPress theme editor. If you aren’t familiar with coding, however, it’s not advisable that you do it this way.

The easiest and safest method for adding the Pixel and other types of code to a WordPress site would be to use WPCode, which we installed earlier.

Back in the WordPress dashboard, click on Code Snippets » Header and Footer from the left sidebar.

WPCode Header and Footer snippets

Paste the Pixel code in the section labeled Header then save changes, and that will be all for this step.

Paste Pixel in header

WP Code will automatically insert the pixel into the header code of your website, and tracking will be enabled.

Now, we’ll go back into TikTok ads manager to tell TikTok what events we want our Pixel to track.

Step 5. Create Event

Back in TikTok, we’ll click on Enter URL Keywords since we want the Pixel to track our form submission confirmation page.

URL Events

First choose an event type. In this case, Submit Form is the event type we want to track.

Submit form

You’ll be prompted to enter the URL Keywords, which is just the slug for our confirmation page. Ours is thank-you, so that’s what we’ll enter.

Thank you page slug

Save these settings and that will be all. TikTok will now track users who submit our form.

Step 6. Check that the TikTok Pixel Is Working

Now that we’ve run through the setup, it’s time to check that everything is working as it should. It will take some time to generate enough real-world usage data, but you can quickly confirm that the pixel is working by installing a TikTok browser extension called the TikTok Pixel Helper.

TikTok Pixel Helper

To use the TikTok Pixel helper, simply copy this string of characters: ?dbgrmrktng.

Then add it to the URL of your form submission page. For example: sulliesflowers.com/thank-you/?dbgrmrktng.

Then open the TikTok Pixel Helper to check the results.

Confirmation of an active TikTok Pixel on the site

And that’s it! You now know how to set up a TikTok Pixel on your WordPress website!

If you’re a frequent TikTok user, having the app integrated with your WordPress website is a must. But, as you might know, you’ll need a plugin to do this. Check out our suggestions for the best TikTok plugins for WordPress.

Next, Set Up User Journey Mapping

The TikTok Pixel is great at tracking users who come to your site from TikTok. But what if you wanted to understand how all users behave on your site before they submit a form? The WPForms User Journey addon is the perfect tool for this. Here’s a beginner’s guide to user journey mapping.

Create Your WordPress Form Now

Ready to build your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes a free contact form template and offers a 14-day money-back guarantee.

If this article helped you out, please follow us on Facebook and Twitter for more free WordPress tutorials and guides.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPForms is funded, why it matters, and how you can support us.

Editorial Team

The WPForms Editorial Team consists of WordPress experts and small business growth specialists. We're passionate about helping entrepreneurs and website owners succeed. Learn More

The Best WordPress Drag and Drop Form Builder Plugin

Easy, Fast, and Secure. Join over 6 million website owners who trust WPForms.

Please enable JavaScript in your browser to complete this form.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.