Enable eCommerce Tracking for WooCommerce

Want to track your eCommerce sales data? To start tracking your sales data, first you’ll need to enable eCommerce tracking in Google Analytics account.

Follow below simple steps to enable eCommerce tracking in Google Analytics account:

  • First, you’ll need to log in to Google Analytics.
  • Then, select the website(property).
  • Next, click Admin in the menu bar
  • Now click eCommerce Settings.
Enable eCommerce tracking in google account
Enable eCommerce tracking in Google account
  • Next, click on Enable eCommerce, to turn it on. Then click the Next Step button.
Enable Ecommerce then click the Next Step button
Enable Ecommerce then click the Next Step button

Add Google Analytics eCommerce tracking code:

Open thankyou.php file from woocommerce/checkout directory.

Place below code at the end of file:

That’s it, just make test transaction and check in Google analytics after some time. Your sales data will be visible.


Thank you.

Keep code!

Protect WordPress with .htaccess | WordPress Optimization

WordPress is world’s most popular CMS, but with this growth, It also have some bad points. WordPress can be hacked easily, To get more security we can use some htaccess rules.

.htaccess is very common and most essential file. You can do lots of things by using .htaccess file.

Enable Browser Caching:

Browser caching allows users to speed up the loading time of websites by serve cached copy of design elements such as CSS stylesheets and media items such as images from users computer rather then website server.

To enabling browsing caching, you need to add this code to your .htaccess file:

GZIP Compression:

When visit webpage, request send to web server, if the server has gzip enable it receive gzip file which is significantly smaller and if it’s not enable it receive the page which is uncompressed version which may be bigger in size.

Gzip locates similar strings within a text file and replaces those strings temporarily to make the overall file size smaller. By gzip compressor reduce the size of page and style sheet by up to 70%

If your hosting provider has mod_gzip module enabled, the best way to compress your content is to add the following lines to your .htaccess file:

Enable gzip compression on Apache web-servers:

Enable compression on NGINX web-servers:

Keep Alive:

Display webpages in browser must request a file from web server, if file exists on web server browser gets the file and read the file. Then browser request other things like HTML, style sheets, JavaScript and images. If a new connection has to be open for every request or file it could take significantly longer time.

Keep alive also known as persistant connection that says “At a time you can get more more than just a single file”

Enable keep-alive in Apache:

Leverage browser caching:

Every time browser load web page it has to download all the web files like HTML, CSS, JavaScript, logo and images to properly display the page. Browser caching can help by storing some of these files locally in the user’s browser.

Browser caching is important is because it reduces the load on your web server, which ultimately reduces the load time of website.

Protecting wp-config.php:

Disable File Editing:

Protect WP-Includes:

If you are having problems implementing the above suggestion or beefing up the security, optimization of your WordPress installation, drop us an email. and we will gladly assist you.