> For the complete documentation index, see [llms.txt](https://docs.rafflex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rafflex.io/additional-settings/settings/advanced-settings.md).

# Advanced Settings

Add tracking and verification code to your site, show custom HTML on the thank you page, and limit who can see entry lists.

***

The **Advanced & Configuration** page is where you add code from other services to your site, such as analytics tags, ad pixels and site verification codes. It also holds a few extra options for your thank you page and entry lists.

{% hint style="danger" %}
**Use responsibly. Bad code can ruin your site.** Anything you paste into the code fields on this page is added to your live website exactly as it is. A broken or badly written snippet can stop pages from loading properly, break your checkout, or slow your site down. Only paste code from a service you trust, and copy it exactly as they give it to you.
{% endhint %}

### How to open Advanced settings

1. In the **admin panel**, find the **Content** group in the left-hand menu.
2. Click **Settings**.
3. In the Settings side menu, click **Advanced**. The page title reads **Advanced & Configuration**.

The page is split into sections, including **Advanced Settings**, **Code Injection** and **Entry Settings**. The order of the sections can vary slightly from site to site, so scroll down to find the one you need. This guide starts with **Code Injection**, because it is the section most operators use.

***

### Code Injection

The two code fields are inline code editors. Click into the box and paste or type straight in. There is no separate **Edit** button.

#### Header Code

Code in this box is added to the `<head>` section of every page of your site. The head is a hidden part of each web page that loads before visitors see anything, so it is the right place for code that needs to load early.

Use **Header Code** for:

* **Site verification tags** from Google Search Console, Bing, Facebook or Pinterest, which prove to them that you own your domain.
* **Analytics tags** such as Google Analytics or Google Tag Manager. See [Google Analytics](https://docs.rafflex.io/managing-your-site/analytics/google-analytics.md) and [What Google Analytics Tracks](https://docs.rafflex.io/managing-your-site/analytics/google-analytics/what-google-analytics-tracks.md).
* **Advertising pixels** such as the TikTok pixel or Google Ads tag, and any conversion tracking that listens for basket and purchase events. See [Conversion Event Tracking](https://docs.rafflex.io/advanced/conversion-event-tracking.md).
* **Other scripts or styles** that a service asks you to place "in the head" or "before the closing head tag".
* **A cookie consent banner** from a third party provider, such as CookieYes or Silktide. RaffleX does not include a cookie consent banner, so if you need one, sign up with a provider and paste the install code it gives you here. Choosing a provider and making sure your banner meets the cookie rules is up to you.
* **Your own CSS**, to restyle part of your site (for example a colour, a gap between sections, or hiding part of a card). Put it between `<style>` and `</style>` tags. CSS can change more of your site than you expect, on every page, so check your site on a computer and a phone after saving, and remove the code if anything looks wrong. Lots of constantly running animations or scripts can also make your site feel slow, especially on phones.

Header Code also loads on your password page if you have set a [site password](https://docs.rafflex.io/getting-started/hide-your-site-before-launch.md), so verification tags still work while your site is hidden.

#### Body Code

Code in this box is added at the very start of the `<body>` section of every page, straight after the opening body tag and before your site header.

Use **Body Code** for code that a service asks you to place "immediately after the opening body tag". The most common example is the `<noscript>` part of a Google Tag Manager installation.

{% hint style="warning" %}
The description under **Body Code** in the admin panel says the code is added to the end of the body. It is actually added at the **start** of the body, as described above. This is the right place for Google Tag Manager's `<noscript>` snippet. If a service's instructions say its code must go at the very end of the page, check with that service, or contact Rafflex support, before adding it.
{% endhint %}

{% hint style="info" %}
**Facebook and Meta tracking is built in.** You do not need to paste the Meta Pixel into Header Code. Add your Pixel ID on the **Marketing** settings page instead. Adding it here as well could count your visits and sales twice. See [Facebook Tracking](https://docs.rafflex.io/marketing/facebook-and-meta/tracking.md).
{% endhint %}

#### How to add code

1. Copy the code snippet from the service you are setting up (for example Google Analytics or TikTok Ads Manager).
2. Open **Settings**, then click **Advanced** in the side menu.
3. Click into the **Header Code** box, or the **Body Code** box if the service asks for it.
4. If the box already has code in it, click at the very end of the existing code and press Enter to start a new line. Paste your snippet there. Do not delete what is already there unless you know it is no longer needed.
5. Click **Save Settings**.
6. Open your website in a new browser tab and check that it still looks and works normally.
7. If the service has its own checking tool (for example Google Tag Assistant), use it to confirm it can see your code.

{% hint style="success" %}
**Keep things tidy.** You can add more than one snippet to each box. Leave a blank line between them, and if you can, add an HTML comment above each one so you remember what it is, for example `<!-- Google Analytics -->`.
{% endhint %}

{% hint style="warning" %}
**If your site breaks after adding code**, go straight back to **Settings**, then **Advanced**, remove the snippet you just added and click **Save Settings**. Your admin panel is not affected by these fields, so you can always get back in to undo a change.
{% endhint %}

***

### Advanced Settings

#### Order Complete HTML

Anything in this box is shown to customers after they place an order. It appears in two places:

* On the **Order Successful** thank you page straight after checkout.
* On the order's page in the customer's **My Account** area, whenever they go back to look at that order.

On both pages it sits below the competitions and tickets in the order (and the **Repeat This Order!** panel), just above the billing address.

Operators use it for things like:

* A thank you message, a link to your social media pages, or a prompt to join your Facebook group.
* An image or banner promoting your next competition.
* A one-off tracking pixel from an advertising partner.

The box accepts HTML (the code web pages are written in). It shows the same content for every order. It cannot insert details of the order itself, such as the order number or total.

{% hint style="warning" %}
**Tracking pixels can fire more than once.** Because this content also shows whenever a customer revisits an order in **My Account**, a tracking pixel placed here can be triggered again each time they look at an old order. That can make your sales figures look higher than they are. For purchase tracking, use the built-in purchase event instead, as explained in [Conversion Event Tracking](https://docs.rafflex.io/advanced/conversion-event-tracking.md).
{% endhint %}

***

### Entry Settings

#### Disable Entry List Unless In The Competition

When this is on, a customer can only see a competition's entry list once they have bought tickets in that competition. Anyone else who opens the entry list sees the message "To view our full entry list you first have to be a part of this competition." and a button to go to the competition.

When it is off, anyone can view the entry list of any competition that has its entry list switched on.

You and other admins can always see every entry list, whichever way this is set.

To learn how entry lists work and how to switch them on for a competition, see [Entry List Display](https://docs.rafflex.io/additional-settings/settings/entry-list-display.md).

***

### Saving your changes

1. Make your changes on the page.
2. Click **Save Settings** at the bottom of the page (or press **Cmd + S** on a Mac, **Ctrl + S** on Windows).
3. A green message reading "Advanced settings saved successfully" confirms the save.

Changes go live on your site straight away. Refresh your website to see them.

***

### Related pages

{% content-ref url="/pages/latIG3KJpsBOIgdDH9Aa" %}
[Google Analytics](https://docs.rafflex.io/managing-your-site/analytics/google-analytics.md)
{% endcontent-ref %}

{% content-ref url="/pages/2rhzTztqN3RkgA0N7k8S" %}
[Conversion Event Tracking](https://docs.rafflex.io/advanced/conversion-event-tracking.md)
{% endcontent-ref %}
