Skip to content

WP-CLI parancsok

A wp lw-pixel parancsai: status, list, config list/get/set/reset és migrate, valódi kimenetekkel.

This content is not available in your language yet.

Főparancs: wp lw-pixel. Alparancsok: status, list, config (list, get, set, reset), migrate (list, preview, run). A kimenet angol.

Állapot-összesítő. Kapcsolója nincs.

Kimenet
$ wp lw-pixel status
setting value
Version 1.4.1
Configured pixels 0 / 12
Disable for admins On
Medical mode Off
LDU mode Off
Meta CAPI Off
GA4 Measurement Protocol Off

A „Configured” azt jelenti: bekapcsolva, és van azonosító. A Disable for admins On sor mutatja, hogy adminként bejelentkezve nem fut a pixel (Tesztelés). A ChatGPT Ads Conversions API állapotát a status nem mutatja.

wp lw-pixel list [--format=<table|json|csv|yaml>] [--configured]. A --configured csak a beállított pixeleket listázza.

Kimenet
$ wp lw-pixel list
id label enabled configured
fb Meta (Facebook) Pixel no no
ga4 Google Analytics 4 no no
gads Google Ads no no
gtm Google Tag Manager no no
tiktok TikTok Pixel no no
pinterest Pinterest Tag no no
bing Microsoft Bing UET no no
reddit Reddit Pixel no no
snapchat Snapchat Pixel no no
x X (Twitter) Pixel no no
chatgpt ChatGPT Ads no no
barion Barion Pixel no no
$ wp lw-pixel list --configured
Warning: No pixels found.

wp lw-pixel config list [--format=<table|json|csv|yaml>] [--changed]. Oszlopok: key, value, default, is_default. A titkok ********-ként látszanak. A --changed csak az alapértéktől eltérőket listázza.

Kimenet (részlet)
$ wp lw-pixel config list
key value default is_default
fb_enabled false false yes
fb_pixel_id yes
...
ga4_anonymize_ip true true yes
...
event_pageview true true yes
event_scroll_thresholds 25,50,75,100 25,50,75,100 yes
...
consent_analytics_pixels ga4, bing ga4, bing yes
consent_unclassified_pixels gtm gtm yes
compliance_ldu_mode auto auto yes
disable_for_admins true true yes
Kimenet
$ wp lw-pixel config get disable_for_admins
true
$ wp lw-pixel config get nope
Error: Unknown setting key: 'nope'

wp lw-pixel config set <key> <value>

Terminál
wp lw-pixel config set fb_enabled true
wp lw-pixel config set fb_pixel_id 1234567890
wp lw-pixel config set ga4_measurement_id G-XXXXXXX
wp lw-pixel config set consent_marketing_pixels "fb,tiktok,pinterest"
wp lw-pixel config set head_code '<script>…</script>' --user=admin

Siker: Success: Set '<key>' to '<érték>'. (titoknál maszkolva).

Hibák:

  • Unknown setting key: '<key>': elgépelt kulcs; a kulcsok listája: wp lw-pixel config list.
  • '<key>' needs a user with the unfiltered_html capability. Run it with --user=<administrator>.: az egyéni kód kulcsai (head_code, body_open_code, footer_code) csak --user= megadásával írhatók.
  • Failed to update '<key>'.: ez akkor is megjelenik, ha az új érték megegyezik a régivel.

wp lw-pixel config reset [--yes]: minden beállítást alapértékre állít, a titkos kulcsokat is törli. Rákérdez (Reset all LW Pixel settings to defaults?), a --yes ezt kihagyja. Siker: All settings reset to defaults.

Import a PixelYourSite (Free / Pro) beállításaiból. Az importer azonosítója pys.

Kimenet (PixelYourSite nélküli oldalon)
$ wp lw-pixel migrate list
id label available
pys PixelYourSite (Free / Pro) no
$ wp lw-pixel migrate preview pys
Error: Migrator 'pys' is not available on this site (source plugin / data not found).
  • migrate preview pys [--format=…]: oszlopok key, from, to; titok maszkolva. Ha nincs mit átvinni: No changes — nothing to migrate.
  • migrate run pys [--yes]: rákérdez, majd: Migration "pys" finished — N updated, M skipped., utána az Updated: és Skipped: lista.
  • Ismeretlen azonosítónál: Unknown migrator: '<id>'. Run 'wp lw-pixel migrate list' to see available ids.

We respect your privacy

We use cookies to improve your browsing experience and to analyse traffic. Analytics only starts if you allow it. Privacy policy, Cookie policy.

Cookie settings