{
 "id": "ads-utm-naming-builder",
 "file": "softwiro-ads-utm-naming-builder.xlsx",
 "title": "شيت بناء روابط UTM وتسمية الحملات",
 "language": "ar",
 "direction": "rtl",
 "how_it_works": "White cells are typed input; cells whose kind is \"formula\" are calculated and must not be overwritten. Add one record per row under the header row of a record table, keeping the columns in order.",
 "sheets": [
  {
   "name": "ابدأ هنا",
   "formula_cells": 0
  },
  {
   "name": "الإعدادات",
   "formula_cells": 0,
   "settings": [
    {
     "label": "اسم النشاط",
     "cell": "B4",
     "value": "متجر تجريبي (مثال)"
    },
    {
     "label": "الفاصل بين أجزاء اسم الحملة",
     "cell": "B5",
     "value": "_"
    },
    {
     "label": "ترتيب اسم الحملة",
     "cell": "B6",
     "value": "المصدر أولًا"
    },
    {
     "label": "المصادر المسموحة (utm_source)",
     "cell": "B10",
     "value": "الوسائط المسموحة (utm_medium)"
    },
    {
     "label": "facebook",
     "cell": "B11",
     "value": "cpc"
    },
    {
     "label": "instagram",
     "cell": "B12",
     "value": "paid_social"
    },
    {
     "label": "google",
     "cell": "B13",
     "value": "display"
    },
    {
     "label": "tiktok",
     "cell": "B14",
     "value": "email"
    },
    {
     "label": "snapchat",
     "cell": "B15",
     "value": "whatsapp"
    },
    {
     "label": "linkedin",
     "cell": "B16",
     "value": "influencer"
    }
   ]
  },
  {
   "name": "الروابط",
   "formula_cells": 3200,
   "record_tables": [
    {
     "header_row": 5,
     "first_record_row": 6,
     "sample_rows_filled": 29,
     "capacity_last_row": 405,
     "columns": [
      {
       "column": "A",
       "header": "رابط الصفحة",
       "kind": "input",
       "examples": [
        "https://shop-demo.example.com/offers",
        "https://shop-demo.example.com/offers",
        "https://shop-demo.example.com/offers"
       ]
      },
      {
       "column": "B",
       "header": "المصدر",
       "kind": "input",
       "examples": [
        "facebook",
        "instagram",
        "google"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$A$11:$A$20"
       }
      },
      {
       "column": "C",
       "header": "الوسيط",
       "kind": "input",
       "examples": [
        "paid_social",
        "paid_social",
        "cpc"
       ],
       "allowed_values": {
        "from_range": "'الإعدادات'!$B$11:$B$18"
       }
      },
      {
       "column": "D",
       "header": "اسم الحملة",
       "kind": "input",
       "examples": [
        "Black Friday 2026",
        "Black Friday 2026",
        "Black Friday 2026"
       ]
      },
      {
       "column": "E",
       "header": "المحتوى (اختياري)",
       "kind": "input",
       "examples": [
        "Video A",
        "Reel B",
        "RSA 1"
       ]
      },
      {
       "column": "F",
       "header": "الكلمة (اختياري)",
       "kind": "input",
       "examples": [
        "Winter Jackets",
        "sports shoes cairo",
        "Retail Owners"
       ]
      },
      {
       "column": "G",
       "header": "التاريخ",
       "kind": "input",
       "examples": [
        "2026-11-01",
        "2026-11-01",
        "2026-11-02"
       ]
      },
      {
       "column": "H",
       "header": "الحملة بعد التوحيد",
       "kind": "formula",
       "formula_row_1": "=IF(TRIM(D6&\"\")=\"\",\"\",LOWER(SUBSTITUTE(TRIM(D6),\" \",\"-\")))"
      },
      {
       "column": "I",
       "header": "المحتوى موحد",
       "kind": "formula",
       "formula_row_1": "=IF(TRIM(E6&\"\")=\"\",\"\",LOWER(SUBSTITUTE(TRIM(E6),\" \",\"-\")))"
      },
      {
       "column": "J",
       "header": "الكلمة موحدة",
       "kind": "formula",
       "formula_row_1": "=IF(TRIM(F6&\"\")=\"\",\"\",LOWER(SUBSTITUTE(TRIM(F6),\" \",\"-\")))"
      },
      {
       "column": "K",
       "header": "الرابط الكامل",
       "kind": "formula",
       "formula_row_1": "=IF(OR(TRIM(A6&\"\")=\"\",TRIM(B6&\"\")=\"\",TRIM(C6&\"\")=\"\",H6=\"\"),\"\",TRIM(A6)&IF(IFERROR(FIND(\"?\",A6),0)>0,\"&\",\"?\")&\"utm_source=\"&LOWER(SUBSTITUTE(TRIM(B6),\" \",\"-\"))&\"&utm_medium=\"&LOWER(SUBSTITUTE(TRIM(C6),\" \",\"-\"))&\"&utm_campaign=\"&H6&IF(I6=\"\",\"\",\"&utm_content=\"&I6)&IF(J6=\"\",\"\",\"&utm_term=\"&J6))"
      },
      {
       "column": "L",
       "header": "اسم الحملة المنظم",
       "kind": "formula",
       "formula_row_1": "=IF(K6=\"\",\"\",IF('الإعدادات'!$B$6=\"التاريخ أولًا\",IF(ISNUMBER(G6),(YEAR(G6)*100+MONTH(G6))&'الإعدادات'!$B$5,\"\")&LOWER(SUBSTITUTE(TRIM(B6),\" \",\"-\"))&'الإعدادات'!$B$5&LOWER(SUBSTITUTE(TRIM(C6),\" \",\"-\"))&'الإعدادات'!$B$5&H6,LOWER(SUBSTITUTE(TRIM(B6),\" \",\"-\"))&'الإعدادات'!$B$5&LOWER(SUBSTITUTE(TRIM(C6),\" \",\"-\"))&'الإعدادات'!$B$5&H6&IF(ISNUMBER(G6),'الإعدادات'!$B$5&(YEAR(G6)*100+MONTH(G6)),\"\")))"
      },
      {
       "column": "M",
       "header": "ملاحظة",
       "kind": "formula",
       "formula_row_1": "=IF(AND(TRIM(A6&\"\")=\"\",TRIM(B6&\"\")=\"\",TRIM(C6&\"\")=\"\",TRIM(D6&\"\")=\"\"),\"\",IF(TRIM(A6&\"\")=\"\",\"الرابط ناقص\",IF(TRIM(B6&\"\")=\"\",\"المصدر ناقص\",IF(TRIM(C6&\"\")=\"\",\"الوسيط ناقص\",IF(TRIM(D6&\"\")=\"\",\"اسم الحملة ناقص\",IF(LEFT(TRIM(A6),4)<>\"http\",\"الرابط لا يبدأ بـ http\",IF(COUNTIF('الإعدادات'!$A$11:$A$20,TRIM(B6)&\"\")=0,\"مصدر غير مسجل\",IF(COUNTIF('الإعدادات'!$B$11:$B$18,TRIM(C6)&\"\")=0,\"وسيط غير مسجل\",\"\"))))))))"
      },
      {
       "column": "N",
       "header": "مفتاح",
       "kind": "formula",
       "formula_row_1": "=IF(K6=\"\",\"\",SUBSTITUTE(SUBSTITUTE(LOWER(K6),\"?\",\"~\"),\"*\",\"~\"))"
      },
      {
       "column": "O",
       "header": "تكرار",
       "kind": "formula",
       "formula_row_1": "=IF(N6=\"\",\"\",IF(COUNTIF($N$6:$N$405,N6&\"\")>1,\"مكرر\",\"\"))"
      }
     ]
    }
   ]
  },
  {
   "name": "الملخص",
   "formula_cells": 121,
   "settings": [
    {
     "label": "المصدر",
     "cell": "B12",
     "value": "الإجمالي"
    }
   ],
   "results": [
    {
     "label": "روابط جاهزة (مولّدة)",
     "cell": "B4",
     "formula": "=COUNTIF('الروابط'!$K$6:$K$405,\"?*\")"
    },
    {
     "label": "صفوف بها ملاحظة",
     "cell": "B5",
     "formula": "=COUNTIF('الروابط'!$M$6:$M$405,\"?*\")"
    },
    {
     "label": "صفوف رابطها مكرر",
     "cell": "B6",
     "formula": "=COUNTIF('الروابط'!$O$6:$O$405,\"مكرر\")"
    },
    {
     "label": "روابط جاهزة بلا ملاحظة",
     "cell": "B7",
     "formula": "=B4-COUNTIFS('الروابط'!$K$6:$K$405,\"?*\",'الروابط'!$M$6:$M$405,\"?*\")"
    },
    {
     "label": "الإجمالي",
     "cell": "B23",
     "formula": "=SUM(B13:B22)"
    }
   ]
  },
  {
   "name": "لماذا ما زلت على إكسل؟",
   "formula_cells": 0
  }
 ]
}