Spaces:
Sleeping
Sleeping
GA4 ID is env var
Browse files- autenticacion.py +5 -2
- ga4Analiticas.py +1 -1
autenticacion.py
CHANGED
|
@@ -16,6 +16,7 @@ def defineAmbiente(env):
|
|
| 16 |
webhook = bridges.webhook_sandbox
|
| 17 |
firestore = 'config_dev.json'
|
| 18 |
ga4Key = bridges.GA4_API_SECRET_TARGET
|
|
|
|
| 19 |
else:
|
| 20 |
print("Entorno remoto listo...")
|
| 21 |
if os.getenv("ambiente_stripe") == 'prod':
|
|
@@ -24,14 +25,16 @@ def defineAmbiente(env):
|
|
| 24 |
webhook = os.getenv("STRIPE_WEBHOOK_SECRET_PROD")
|
| 25 |
config_creator.creaConfigFirestore('configuracion_prod') #La secret var de HF respecto a prod.
|
| 26 |
ga4Key = os.getenv("GA4_SECRET_PROD")
|
|
|
|
| 27 |
else: #if dev
|
| 28 |
print("Ambiente stripe es: ", os.getenv("ambiente_stripe"))
|
| 29 |
llave = os.getenv("STRIPE_KEY_SANDBOX") #Acceso a HF
|
| 30 |
webhook = os.getenv("STRIPE_WEBHOOK_SECRET_SANDBOX")
|
| 31 |
config_creator.creaConfigFirestore('configuracion_dev') #La secret var de HF respecto a dev.
|
| 32 |
-
ga4Key = os.getenv("GA4_SECRET_DEV")
|
|
|
|
| 33 |
|
| 34 |
-
return llave, webhook, ga4Key
|
| 35 |
|
| 36 |
def local_check():
|
| 37 |
hostname = socket.gethostname()
|
|
|
|
| 16 |
webhook = bridges.webhook_sandbox
|
| 17 |
firestore = 'config_dev.json'
|
| 18 |
ga4Key = bridges.GA4_API_SECRET_TARGET
|
| 19 |
+
ga4ID = bridges.GA4_MEASUREMENT_ID
|
| 20 |
else:
|
| 21 |
print("Entorno remoto listo...")
|
| 22 |
if os.getenv("ambiente_stripe") == 'prod':
|
|
|
|
| 25 |
webhook = os.getenv("STRIPE_WEBHOOK_SECRET_PROD")
|
| 26 |
config_creator.creaConfigFirestore('configuracion_prod') #La secret var de HF respecto a prod.
|
| 27 |
ga4Key = os.getenv("GA4_SECRET_PROD")
|
| 28 |
+
ga4ID = os.getenv("GA4_ID_PROD")
|
| 29 |
else: #if dev
|
| 30 |
print("Ambiente stripe es: ", os.getenv("ambiente_stripe"))
|
| 31 |
llave = os.getenv("STRIPE_KEY_SANDBOX") #Acceso a HF
|
| 32 |
webhook = os.getenv("STRIPE_WEBHOOK_SECRET_SANDBOX")
|
| 33 |
config_creator.creaConfigFirestore('configuracion_dev') #La secret var de HF respecto a dev.
|
| 34 |
+
ga4Key = os.getenv("GA4_SECRET_DEV")
|
| 35 |
+
ga4ID = os.getenv("GA4_ID_DEV")
|
| 36 |
|
| 37 |
+
return llave, webhook, ga4Key, ga4ID
|
| 38 |
|
| 39 |
def local_check():
|
| 40 |
hostname = socket.gethostname()
|
ga4Analiticas.py
CHANGED
|
@@ -2,7 +2,7 @@ import json
|
|
| 2 |
import requests
|
| 3 |
import globales
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
def send_ga4_purchase_event(session):
|
| 8 |
"""
|
|
|
|
| 2 |
import requests
|
| 3 |
import globales
|
| 4 |
|
| 5 |
+
|
| 6 |
|
| 7 |
def send_ga4_purchase_event(session):
|
| 8 |
"""
|