===PixelYourSite - Facebook Pixel (Events, WooCommerce & Easy Digital Downloads)===
Contributors: PixelYourSite, c0d3fev3r, themister
Tags: Facebook Pixel, New Facebook Pixel, Facebook Conversion Pixel, Facebook Pixel Events, Facebook, New Facebook Pixel Events, Dynamic Events, Standard Events, Facebook Events, Facebook Standard Events, Facebook Dynamic Product Ads, WooCommerce, WooCommerce Facebook Pixel, Facebook Custom Events, Facebook Conversion Value, WooCommerce Affiliate Products, Easy Digital Downloads Pixel, Easy Digital Downloads Facebook Pixel
Requires at least: 3.0.1
Requires PHP: 5.3
Tested up to: 5.0
Stable tag: 5.3.3
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Insert the new Facebook Pixel on WordPress, add Events, enjoy superb WooCommerce & EDD Facebook Pixel integration

== Description ==
<strong>Manage the New Facebook Pixel With Just a Few Clicks. WooCommerce and Easy Digital Downloads integration.</strong></br>

The New Facebook Pixel can be a very powerful tool for anyone doing Facebook ads, and with the PixelYourSite plugin, you can unleash its real potential.


**Take a look at this video to see the plugin in action:**

[youtube https://www.youtube.com/watch?v=V_IWVxUrzSM]

>**GDPR update**
>
>PixelYourSite manages the Facebook pixel tracking code. Chances are that you have other scripts or third-party cookies running on your website (embedded videos, ad networks, chats, etc). In order to be GDPR compliant, you’ll need to implement a technical solution that will inform and obtain consent for all your tracking scripts and cookies, not just the Facebook pixel. That’s why we don’t have an individual solution to ask consent for our plugin only. We will offer a few ways to integrate with other existing cookie policy plugins.
>
>**[Find more about the Facebook pixel and GDPR here](http://www.pixelyoursite.com/gdpr-cookie-compliance)**

**PixelYourSite will help you insert the Facebook pixel code on every page of your site with just one click** and set up Custom or Standard Events.

**E-commerce Ready**

There is an automatic **WooCommerce integration** that will configure all the necessary standard events for you. **You don't have to add any event yourself.**

**Easy Digital Downloads** is also supported.

**Facebook Dynamic Ads (Promote a product catalog) is fully supported for WooCommerce and Easy Digital Downloads**, with ViewContent, AddToCart and Purchase events being added on the corresponding pages (content_ids and content_type are pulled automatically by the plugin).

The plugin is **Custom Audience Super-Friendly**, extracting content_name, post_type, content_ids, content_category on every page of your site. Tags and product tags are tracked by the pro version of the plugin.

You’ll find a **[Learning Section](http://www.pixelyoursite.com/learn)** on our website, with helpful articles that answer to our users common (and sometimes uncommon) questions, together with top-notch “how to” pages.

Find more info [about how to use the FB pixel plugin - Click here](http://www.pixelyoursite.com/facebook-pixel-plugin-help)

Not ready to install yet? Read on some of the key features that make PYS a powerful tool in any Facebook marketer arsenal.

<strong>PixelYourSite Key Features:</strong></br>

* You can **insert the pixel on every page of your website with just ONE click**. No need to edit any posts or pages

* **Optimise your site for Facebook Custom Audiences.** We add a special event (GeneralEvent) on every page that will send key parameters to Facebook, like content name, content ID, category name and post type. You can use it to create super-powerful Custom Audiences to retarget with your ads, or to expand your reach with Lookalike Audiences.

>**How to use the GeneralEvent**
>
>**1. Custom Audiences**
>
>The GeneralEvent will have the following parameters:
>
>* post_id
>* post_type (it will pull the WordPress post type, like post, category and so on)
>* content_category (for posts, it will show the post category)
>* domain (it will pull the domain name - useful if you are using the pixel on more than one sites)
>* tags - pro version
>
>**Example:** you can create a Custom Audience from people that viewed articles from one specific category in the last 30 days or people that visited articles having one or more tags, a particular page (using the name or the ID), or content that has a particular word in the name.
>
>**2. Custom Conversions**
>
>**Example:** You can define a Custom Conversion when someone reads at least 3 articles from a particular category, or when it lands on a specific page, or on any article that has a particular tag.

* **Search Event** on the search page with the search string pulled as a parameter - super useful for creating search based Custom Audiences

>**How to use the Search Event:**
>
Retargeting the users that performed a search on your site is a smart strategy because this is a highly engaged audience that knows you and it's interested in what you offer.
>
>It can be a good idea to go a little further and create Custom Audiences based on a few important keywords that potential buyers might search for.

* **Delay Events**, so you don't spend your money on retargeting bouncing visitors.

* You can turn ON/OFF the pixel based on user roles (remove it for admins, editors and so on)

* You can **set up and track Standard or Custom Events** and add parameters for each of them

* All the events will have a **domain name parameter**, so you can easily create Custom Audiences from events when you have more than one site

**Superb WooCommerce Integration**

Tested with the latest WooCommerce version.

* You can **insert the Facebook pixel and start tracking events on any WooCommerce** website with just a few clicks (Purchase, ViewContent, AddToCart, InitiateCheckout, ViewCategory)

* Out of the box **Facebook Dynamic Ads** (promote a product catalog) pixel setup for your WooCommerce website (we also have a dedicated feed plugin for Facebook Dynamic Ads Product Catalog)

* Flexible AddToCart Event: the event will fire by default on add to cart button clicks. Ajax buttons are supported. Additionally, the event can be fired on the Cart Page, or on the Checkout Page (useful for some particular web structures).

*  Track conversion value for WooCommerce - each event can use the product price as value. You can turn it on or off.

**Easy Digital Downloads Integration**

* You can **insert the Facebook pixel and start tracking events on any Easy Digital Downloads** website with just a few clicks (Purchase, ViewContent, AddToCart, InitiateCheckout)

* Out of the box **Facebook Dynamic Ads** (promote a product catalog) pixel setup for your Easy Digital Downloads website.

* **Dynamic AddToCart** is fully supported (the AddToCart event will fire on add to cart button click)

* **Track conversion value for Easy Digital Downloads**

* You can turn ON/OFF each Easy Digital Downloads event.

**Pro Version**

If you are serious about your Facebook ads, you'll love our [pro version](http://www.pixelyoursite.com/facebook-pixel-plugin)

**Improved Custom Audiences & Custom Conversions**

* **Traffic Source and URL tags (UTM)** are added to all the events and you can use them to create Custom Audiences based on where your visitors are coming from. It is possible to track a particular Facebook Ad too.

>You can create Custom Audiences based on where the traffic is coming from, like Google, Facebook or a particular referrer.
>
>Additionally, if you are using URL parameters they will be tracked and added as parameters for all your events. This is extremely useful because you can create Custom Audiences from people coming from a particular ad or campaign, for example.

Find out more on [how the pro version can help you with Custom Conversion and Custom Audiences](http://www.pixelyoursite.com/facebook-pixel-plugin/custom-audiences-conversions)

* **NEW: The ClickEvent** - It will fire EVERY TIME a click is made on your site. Use it for Custom Audiences or Custom Conversions. [Find more here](http://www.pixelyoursite.com/clicks-facebook-custom-conversions-audiences)

* **NEW: Head/Footer scripts** - Add any script you want with our Head/Footer option. It also works on the WooCommerce thank you page. [Find more here](http://www.pixelyoursite.com/head-footer-scripts)

* **NEW: WatchVideo Event** - This event will fire on embedded videos on your site. It can be used to optimize your ads for video views or to retarget your video watchers using Custom Audiences. [Find more here](http://www.pixelyoursite.com/facebook-pixel-plugin/watchvideo-event)


**Dynamic Events**

Optimise your Facebook Campaigns for actions on your website with dynamic events. You can fire them:

* When a URL is clicked
* When a CSS element is clicked (any form button, for example)
* When the mouse is moved over a page element
* On page scroll (scroll percent).

Works with **almost all forms or pop-up plugins.**

Fire a Dynamic Event when the visitor performs a key action on your site and optimize your ads for that event (perfect for affiliate sites, newsletter signups and so on).

Additionally, you can create Custom Audiences based on these dynamic events and retarget them.

Find out more about [PixelYourSite Pro events here](http://www.pixelyoursite.com/facebook-pixel-plugin/facebook-pixel-events)

**Advanced Matching**

This FB feature increases the chances to correctly identify users visiting your website without being logged to their Facebook accounts. The plugin will automatically send to Facebook the data you have about the visitors (email, first name, second name, phone, address info).

**Improved WooCommerce & Easy Digital Downloads Integration**

* **Customise each event value:** You can include or exclude tax and shipping, you can use the product price, **a percent of the product price**, or a global value. Using the proper event value can improve your ads delivery and ROI.

* Delay the WooCommerce & EDD ViewContent Event, so you don't spend your money on retargeting bouncing visitors.

* Super-Powerful **Custom Audiences for WooCommerce**: - we automatically track product name, product category, and product tags. You can use them to create highly targeted Custom Audiences for improved retargeting campaigns.

* **Improved Purchase Event** - The purchase event will have payment and shipping methods, client city, state, and country, plus use of coupons and coupons names tracked as parameters.

>With the Improved Purchased Event you can create extremely useful Custom Audiences and retarget them with highly efficient ads.
>Example: Clients that bought products from category X for at least $100 and that never used coupon ABC.
>
>Retargeting this audience with products from the same or similar category and give them the coupon ABC might be a winning strategy.

* **Advance Matching** is supported for all the events - it will work best for your Purchase event because we will use the client data directly.

* **WooCommerce Affiliate Products Events:** you can add a dynamic event that will trigger on affiliate button clicks.

* **WooCommerce PayPal Standard Events:** you can add a dynamic AddPaymentInfo event that will trigger on WooCommerce PayPal button clicks.

Find more on the [WooCommerce integration here](http://www.pixelyoursite.com/facebook-pixel-plugin/woocommerce-facebook-pixel)

Find more on the [EDD integration here](http://www.pixelyoursite.com/facebook-pixel-plugin/easy-digital-downloads-facebook-pixel)

**The Super-Pack**

* Add multiple pixels IDs - [with the Super-Pack](http://www.pixelyoursite.com/super-pack)
* Use dynamic parameters - [with the Super-Pack](http://www.pixelyoursite.com/super-pack)
* Remove the pixel from any page - [with the Super-Pack](http://www.pixelyoursite.com/super-pack)
* Custom Thank You Page for WooCommerce - [with the Super-Pack](http://www.pixelyoursite.com/super-pack)

<strong>Pixel Helper Errors</strong>

If you are testing your pixel with Pixel Helper Chrome Extension, it is possible that you will see some errors:

**Facebook Pixel can't match products**

It means that the product ID is not found in a Dynamic Ads Product Catalog. If you are not doing Dynamic Ads, or if that event is not Dynamic Ads related, then you are fine. Otherwise, check your product catalog feed and make sure that the product ID is present in there.

For more details on how to use Facebook Pixel Helper and how to interpret its reported errors  [read this special Pixel Helper article](http://www.pixelyoursite.com/facebook-pixel-helper-errors)

**Let’s start now!** Join other thousands of users and install the plugin, because it is easy to use, and will help you with your Facebook campaigns for real



== Installation ==
* From the WP admin panel, click \"Plugins\" -> \"Add new\".
* In the browser input box, type \"PixelYourSite\".
* Select the \"PixelYourSite\" plugin (authored by \"PixelYourSite\"), and click \"Install\".
* Activate the plugin.

OR...

* Download the plugin from this page.
* Save the .zip file to a location on your computer.
* Open the WP admin panel, and click \"Plugins\" -> \"Add new\".
* Click \"upload\".. then browse to the .zip file downloaded from this page.
* Click \"Install\".. and then \"Activate plugin\".

OR...

* Download the plugin from this page.
* Extract the .zip file to a location on your computer.
* Use either FTP or your host's cPanel to gain access to your website file directories.
* Browse to the `wp-content/plugins` directory.
* Upload the extracted `wp_edit` folder to this directory location.
* Open the WP admin panel.. click the \"Plugins\" page.. and click \"Activate\" under the newly added plugin.


== Frequently Asked Questions ==
We maintain an up to date FAQ page on our site:

<strong><a href="http://www.pixelyoursite.com/facebool-pixel-master-faq" target="_blank"><span style="color:#DE4D4D;">Click here for the FAQ page</span></a></strong>

**Do I need to copy/paste the full Facebook Pixel code somewhere?**

No, you just have to enter your pixel ID in the dedicated field. The plugin will do the rest for you.

**Where can I find the Facebook Pixel ID?**

You can find it here:
<a href="https://www.facebook.com/ads/manager/pixel/facebook_pixel" target="_blank">https://www.facebook.com/ads/manager/pixel/facebook_pixel</a>

**Can I use the plugin for  Custom Audiences or Custom Conversions?**

Absolutely yes! Actually, the plugin will super-optimize your site for Custom Audiences and Custom Conversions.
You will be able to create the classical ones based on URLs, but also Custom Combinations, like people who visited posts from category XYZ, or tagged with tag ABC in the last 30 days.

Use the PRO version, and you'll be able to do crazy things, like targeting people that came from Google and visited products under category "blue widget", or clients who bought products of at least $100, using the discount coupon "promo".

**I used the old Facebook Pixel, will my audiences still work?**

Yes, they will, you won't lose anything.

**Does it work with WooCommerce?**

Yes, it does. The plugin adds all the necessary events, like ViewContent, AddToCart, InitiateCheckout, and Purchase. This way you can easily track conversion and c**onversion value.**

** Do I have to manually add the events for WooCommerce?**

No, you don't, the plugin will take care of everything for you.

**Does it work with Easy Digital Downloads?**

Yes, it works in the same way it does with WooCommerce.

**Does it work with Dynamic Ads (promote a product catalog)**

Yes, all the WooCommerce and EDD pixel events are Dynamic Ads ready.

**Can I fire additional events if I need to?**

Of course, you can fire any type of event (standard or custom) on any URL of your site. You can also use a partial URL by adding an * at the end of it (this way all the URLs starting with that string will be targeted).

With the PRO version, you can use Dynamic Events and fire them on:

* clicks on external or internal links
* clicks on CSS elements, like form buttons
* mouse over CSS elements
* page scroll

**Will your plugin increase the loading time of my site?**

The plugin itself is really fast. However, you have to remember that the pixel has to communicate with Facebook to send all the data, and this will add a little load on your site.

Will this impact on your visitors? No, because all the requests are asynchronous, meaning that the browser will continue to load and your users will not see any delay whatsoever.

**Are there any known incompatibilities with other themes or plugins?**

Any program, service, code or plugin that adds the Pixel Code, since you can't have two similar pixels on a page.

* We had a problem with Mamaya, a retargeting service
* It won't work with LeadPages or any similar system  because those pages are generated outside WordPress

If any incompatibilities will arise we will add them here and, of course, will try to fix them as soon as possible.

**I have the pixel installed on my website and I am running a Facebook Campaign, but the reports are confusing me. How can I see my campaign results?**

We have an article about how to create Custom Reports:
<strong><a href="http://www.pixelyoursite.com/facebook-ads-reports-optimisation" target="_blank"><span style="color:#DE4D4D;">How to optimize your Facebook Ads Reports for events tracking</span></a></strong>


== Screenshots ==

1. Add your Facebook Pixel ID and the plugin will insert the code on every page of your website
2. You don’t have to copy/paste all the pixel code, but just the pixel ID. You can find it in your Ads Manager, under Pixels
3. The Search Event will pull each search on your site as a parameter. You can use it to create Custom Audiences
4. The GeneralEvent is triggered on every page and can be used for Custom Audiences. We have a free guide on how to use it, liked from the plugin itself
5. Adding events to any URL of any page of your website is easy: just add the URL, select event type and fill the desired parameters values
6. If you want you can insert a custom event code
7. Or you can select a standard event and use the default parameters
8. WooCommerce integration comes with out of the box Facebook Dynamic Ads setup
9. These are the normal events on a WooCommerce thank you page: the Purchase event has content_ids and content_types (required by Dynamic Ads). The reported error for the GeneralEvent can be ignored (as explained in the help pages)

== Changelog ==

= PixelYourSite 5.3.3 =

* Facebook for WooCommerce compatibility fix: we modify ViewCategory content_type parameter in order to ensure product matching when Facebook for WooCommerce id logic is used.

* WordPress 5.0 compatibility check.

= PixelYourSite 5.3.2 =

* Facebook Pixel Standard Events updated to include the new ones that Facebook released. <a href="https://www.pixelyoursite.com/new-facebook-pixel-standard-events" target="_blank"> Details here</a>


= PixelYourSite 5.3.1 =

* GDPR related update - we've implemented a dedicated filter to disable pixel tracking before consent: pys_disable_by_gdpr

* GDPR related update - we've added built-in integration with Ginger – EU Cookie Law plugin and Cookiebot

= PixelYourSite 5.3.0 =

* Additional improvements to the WooCommerce AddToCart event ("Cannot read property 'data' of undefined" error with some AJAX based themes)

* Fixing potential security issue


= PixelYourSite 5.2.1 =

* AddToCart small improvements to ensure compatibility with some themes using AJAX cart

* Plugin name update

= PixelYourSite 5.2.0 =

* Fixing a possible error with the add to cart button when WooCommerce and WPML are installed on some hostings (we were able to replicate it on SiteGround servers only)

* Enabling the AddToCart event on the Cart page when WooCommerce "Redirect to the cart page after successful addition" option is active. This will ensure that the events are captured.

* Other small improvements to the code related to the AddToCart event

= PixelYourSite 5.1.0 =

* Fixing possible compatibility problem with Facebook for WooCommerce extension
* Improving Facebook for WooCommerce ID logic

= PixelYourSite 5.0.9 =

* ViewCategory - new WooCommerce event, compatible with Facebook Dynamic Product Ads (DPA)

* New WooCommerce events parameter: contents - A list of JSON object that contains the product ids associated with the event as well as additional information about the products. It can help with DPA

* Declaring compatibility with WooCommerce 3.2.6

= PixelYourSite 5.0.8 =

* AddToCart new option: fire the event on the Checkout Page. It will be helpful for some websites with customized structure.

* The AddToCart event was improved to work with AJAX buttons on single product pages. This will help to catch events on a number of themes that use AJAX on the product pages.

* We made additional changes to ensure compatibility with Facebook for WooCommerce latest version.


= PixelYourSite 5.0.7 =

* Purchase event 0 value error fixed (there wasn't any value parameter when the order value was zero)


= PixelYourSite 5.0.6 =


* Facebook for WooCommerce extension integration updated to match the new ID logic (PixelYourSite can be used together with Facebook for WooCommerce extension - this way you can have a Facebook shop without losing our powerful pixel features)


= PixelYourSite 5.0.5.2 =


* Quick fix for a small error with our previous release (we didn't include all the files)


= PixelYourSite 5.0.5 =

* Treat WooCommerce variable products like simple products - useful if your Product Catalog doesn't include variations. When ON, ViewContent content_type will be product and the main item ID will be used for all events instead of the variation item.

= PixelYourSite 5.0.4 =

* Changed WooCommerce ViewContent event content_type to product_group for variable products

= PixelYourSite 5.0.3 =

* WooCommerce and EDD content_ids potential issue fix (the content was not correctly wrapped, leaving room for errors when SKU was used instead of the default WordPress IDs)

= PixelYourSite 5.0.2 =

* Added agent identifier (dvpixelyoursite) as we were directly requested by Facebook
* Checked and confirmed WooCommerce 3 compatibility
* Dynamic WooCommerce Events Value based on the product price
* Facebook for WooCommerce support

= PixelYourSite 5.0.1 =

* WooCommerce 2.7 compatibility update: we made sure everything works with the latest WooCommerce version.

= PixelYourSite 5.0 =

* Easy Digital Downloads Integration - Dynamic Ads (promote a product catalog) are fully supported.

* WooCommerce & Easy Digital Downloads events global value.

= PixelYourSite 4.0.3 =

* Important security updates

= PixelYourSite 4.0.2 =

* WordPress 4.7 compatibility checked

* Manage Events buttons fixed - they were not looking right on WP 4.7

= PixelYourSite 4.0.1 =

* fixing minor bugs

= PixelYourSite 4.0.0 =

* From version 4.0 the plugin uses JS to trigger the code. This allows us to add new useful features.

* Delay Event option added for the GeneralEvent

* Head/Footer option - you can decide where the pixel JS will be called. The default setting is in the page head.

* Various text changes to reflect the new pro features

* WooCommerce SKU id possible error fix


= PixelYourSite 3.1.0 =

* Changing GeneralEvent parameters names to avoid Pixel Helper warning (post_id and post_type are now being used)

* Updating new pro features (tracking tags, advanced matching)

* Minor fixes and code changes

= PixelYourSite 3.0.3 =

* Fixing PHP warnings and errors

* Fixing encoding problems

* Fixing incompatibility with some themes

= PixelYourSite 3.0.2 =

* Small fixes related to some possible HTML errors

* Admin Notice modifications

= PixelYourSite 3.0.1 =

* Fixing potential problem with importing settings from older versions


= PixelYourSite 3.0 =

This is a major release, with a new design and new features:

* Completely new design

* New GeneralEvent feature for improved Custom Audience building (with a free guide)

* ON/OFF option for user roles

* Improved Events and Dynamic Events control

* Facebook Dynamic Ads Pixel Setup for WooCommerce


= PixelYourSite 2.2.4 =

* Fixed a few back*end errors and conflicts

* Adding new currencies

= PixelYourSite 2.2.3 =

* Learning links updated

* Minor PHP warning fixed

= PixelYourSite 2.2.2 =

* Minor fix for admin notice

= PixelYourSite 2.2.1 =

* Fixing not closing admin notice error


= PixelYourSite 2.2 =

* Introducing Dynamic Events (pro)

* Introducing our new Learning Section

= PixelYourSite 2.1 =

* Introducing new WooCommerce Paypal Standard events (pro)

= PixelYourSite 2.0 =

* This update adds full control on Standard Events, with the possibility to define all the available parameters for each event

* You can also add the code for each event with the new event text field. This also lets you define custom events

* WooCommerce Affiliate Products events: you can define events that will trigger on affiliate buttons clicks

* Fixed a potential error for the WooCommerce Purchase Event

= PixelYourSite 1.05 =

* Updated offer for the PRO version

= PixelYourSite 1.04 =

* Fixed fresh install error (when no settings saved)

= PixelYourSite 1.03 =

* Fixed "Select options" error for variable products on categories pages

= PixelYourSite 1.02 =

* Fixed currency symbol error
* Added super special offer for the PRO version

= PixelYourSite 1.01 =

* Dynamic AddToCart event for WooCommerce (the AddToCart event will trigger when a users click on the add to cart button)
* Dynamic AddToCart works with WooCommerce short-codes.
* Fixed a false error that was reported for the Purchase WooCommerce event by Pixel Helper extension on the Thank You page.

= PixelYourSite 1.0 =

* A new plugin is born: It will let you manage the Facebook Pixel with just a few clicks


== Upgrade Notice ==

= 5.0 =

Version 5.0 comes with full Easy Digital Downloads integrations plus the ability to give each WooCommerce and EDD event a global value.

