# Configuration

### 1. Ad code setup (AdSense)

In order to serve AdSense ad code you need to verify the domain first before the ads gets served on your website.

{% hint style="info" %}
This tutorial is for AdSense only but any other Ad Network can be used as well.
{% endhint %}

#### 1. Verify Domain

Add new site on your AdSense account and copy the verification code and paste it in your **head.blade.php** file found in the \themes\Minimal\resources\views\components\ folder, it'll load the script in the \<head> section of the website.

{% code title="Example Code" overflow="wrap" %}

```
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xxxxxxxxxxxxxxxx"
     crossorigin="anonymous"></script>
```

{% endcode %}

#### 2. Create Ad Units&#x20;

Create 4 different ad units with the following configurations and paste the ad code in below mentioned files.

Ad Configuration;

* Ad Size: Responsive
* Horizontal Ads

Copy the ad unit codes and paste them in the following files located in the **\themes\Minimal\resources\views\components\ad\\** folder.

* hero-section-ad.blade.php
* about-section-ad.blade.php
* usage-section-ad.blade.php
* faq-section-ad.blade.php

{% code title="Ad Unit Example" %}

```
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xxxxxxxxxxxxxxxx"
     crossorigin="anonymous"></script>
<!-- xh-res-test -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxx"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
```

{% endcode %}

### 2. Cron job setup

The cron job must be set up as it is responsible for handling background tasks.

Create a new cron job with the following command to run once in an hour.

```
0 * * * * /usr/local/bin/php /public_html/artisan schedule:run >> /dev/null 2>&1
```

Make sure to replace the `/usr/local/bin/php` with your own PHP path & `/public_html/` with your own script directory.

### 3. Add Google Analytics Code

In order to use Google Analytics you need to add gtag.js into the \<head> section of your website, you can do so by adding the script code into the **head.blade.php** file located in the **\themes\Minimal\resources\views\components\\** folder.

{% code title="Example Code" %}

```
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-UA-XXXXXXXX-X"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXXXXXX-X');
</script>
```

{% endcode %}

### 4. BrightData Proxies Setup

You can easily add BrightData proxies in your script by following the below steps.

**1.** Create an account on [BrightData.io](https://bit.ly/brightdataproxy)

**2.** After successfully activating the account go to the "Zones" Section from the side menu and click on "Add Zone" button.

![Referrence Image](/files/-MMEkc2tUuYPFpGyVp9R)

**3.** In "Add new Zone" page select the following options and create zone

* **Network types:** Datacenter
* **Price plan:** Pay as you go\* - $0.6/GB
* **Permissions:** 100% Uptime
* **IP Type:** Shared (Pay per usage)

![Referrence Image](/files/-MMEmSizf-NEY2dI0Xi_)

**4.**  After creating Zone click on the Edit icon and you'll get the following screen, from there you can get your Zone **Username** & **Password**.

![Referrence Image](/files/-MMEo8xaKLP53ECfYxYA)

**5.** You've created your zone and got your zone **username** & **password**, now open your TikTok script admin panel and add your BrightData proxies.

**6.** Open script admin panel and navigate to **Configure Proxies** section.

**7.** Click on Add Proxy, a new page will get open.

**8.** Add the newly generated proxy and press Add Proxy button.

* Protocol: HTTP/HTTPS
* Hostname: zproxy.lum-superproxy.io
* Port: 22225
* Has Authentication: True
* Username: {your-zone-username}
* Password: {your-zone-password}

**9.** Voila! You've successfully added your proxy.

### 5. Add New Language/Translation

In new script update, multi-language support is added. You can now create multiple languages for every theme.

Every theme can have it's own translations, in order to add or remove a language follow the below steps.

{% hint style="info" %}
We'll Add Russian language in this tutorial
{% endhint %}

#### 1. Create JSON File

Open **\themes\Minimal\lang\\** folder and duplicate the **en.json** file and rename it with the desired language code (i.e "en" for English, "ru" for Russian). We'll rename it to ru.json.

Open & edit the newly duplicated **ru.json** file and translate the english text into the Russian language using any text editor.

{% code title="Original" %}

```
   "Popular videos": "Popular videos",
    "How to save TikTok video?": "How to save TikTok video?",
    "Download TikTok Video": "Download TikTok Video",
    "Just insert a link": "Just insert a link",
    "Paste": "Paste",
    "Download": "Download",
```

{% endcode %}

{% code title="Translated" %}

```
   "Popular videos": "популярные видео",
    "How to save TikTok video?": "Как сохранить видео из TikTok?",
    "Download TikTok Video": "Скачать видео с ТикТок",
    "Just insert a link": "Просто вставьте ссылку",
    "Paste": "Вставить",
    "Download": "Скачать",
```

{% endcode %}

#### 2. Enable Language

Open your respective theme folder **\themes\Minimal\\** and open **theme.json** file.

Add new line in the locales section, and define your language and it's name.

{% code title="Before" %}

```
{
    "name": "Minimal Theme",
    "description": "Minimal theme for TT Downloader",
    "author": "CodeSpikeX",
    "preview": "screenshot.png",
    "version": "1.0",
    "id": "Minimal",
    "locales": {
        "en": "English",
        "ar": "Arabic",
        "id": "Bahasa Indonesia",
        "de": "Deutsch",
        "es": "Español",
        "tr": "Türkçe",
        "fr": "Français"
    },
    "rtl_support": [
        "ar"
    ]
}
```

{% endcode %}

{% code title="After" %}

```
{
    "name": "Minimal Theme",
    "description": "Minimal theme for TT Downloader",
    "author": "CodeSpikeX",
    "preview": "screenshot.png",
    "version": "1.0",
    "id": "Minimal",
    "locales": {
        "en": "English",
        "ar": "Arabic",
        "id": "Bahasa Indonesia",
        "de": "Deutsch",
        "es": "Español",
        "tr": "Türkçe",
        "fr": "Français", //DON'T FORGET THIS COMMA
        "ru": "Russian"  // NO COMMA AT THE END
    },
    "rtl_support": [
        "ar"
    ]
}
```

{% endcode %}

#### 3. RTL Support

If the language is RTL you need to specify it as well in the **theme.json** file located in the **\themes\Minimal\\** folder.

{% code title="Example" %}

```
"rtl_support": [
        "ar", //DON'T FORGET THIS COMMA
        "ru" // NO COMMA AT THE END
    ]
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tiktok.docs.codespikex.com/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
