1. Home
  2. Docs
  3. Insert PHP Code Snippet
  4. User Guide
  5. PHP Code Snippets

PHP Code Snippets

In the PHP Code Snippets section, we can see all the available snippets and can create new snippets.


On this page, we can see all the Snippets, shortcode of the snippet, and status of the snippet.


If the snippet is active, you can deactivate it by clicking on the deactivate image in the Action section.

To activate a snippet click on the activate button

You can edit the snippet by clicking on the edit button

To delete the snippet, click on the delete button.

Using the preview button, we can see the preview of the snippet.

To create a new PHP Code Snippet, please click on the button “Add New PHP Code Snippet

Add PHP Snippet

Here you can enter the Tracking Name and the PHP code (without the starting and ending PHP tags <?php  ?>).

Now click on the Create button and you will get a shortcode.

Please copy this shortcode and paste it in the location where you want to display the content.

When you create a new post or page, you can see the snippet in the editor section as given below.

php snippets

Note: To add the snippet code in templates, please follow the link  Can I embed the PHP Snippet into my template file?

Was this article helpful to you? Yes 37 No 50