Spaces:
Running
Running
Precisiones a type
Browse files- ga4Analiticas.py +3 -3
ga4Analiticas.py
CHANGED
|
@@ -20,12 +20,12 @@ def send_ga4_purchase_event(session):
|
|
| 20 |
print(f"Imágenes es: {imagenes} y es del tipo {type(imagenes)}...")
|
| 21 |
valor = session['amount_total'] / 100.0
|
| 22 |
print(f"Valor es {valor} y es del tipo {type(valor)}...")
|
| 23 |
-
cxm = valor / int(imagenes) #costo por imagen
|
| 24 |
print(f"cxm es {cxm} y su tipo es {type(cxm)}...")
|
| 25 |
time.sleep(16)
|
| 26 |
|
| 27 |
id_imagenes = str(imagenes) + 'i'
|
| 28 |
-
id_valor = str(valor) + moneda
|
| 29 |
id_cxm = str(cxm) + moneda
|
| 30 |
print(f"id_cxm es : {id_cxm} y su tipo es {type(id_cxm)}...")
|
| 31 |
|
|
@@ -44,7 +44,7 @@ def send_ga4_purchase_event(session):
|
|
| 44 |
items.append({
|
| 45 |
"item_id": item_id, #1000i-1900mxn
|
| 46 |
"item_name": item_name, #1.8mxn
|
| 47 |
-
"price":
|
| 48 |
"quantity": 1
|
| 49 |
})
|
| 50 |
|
|
|
|
| 20 |
print(f"Imágenes es: {imagenes} y es del tipo {type(imagenes)}...")
|
| 21 |
valor = session['amount_total'] / 100.0
|
| 22 |
print(f"Valor es {valor} y es del tipo {type(valor)}...")
|
| 23 |
+
cxm = int(valor) / int(imagenes) #costo por imagen
|
| 24 |
print(f"cxm es {cxm} y su tipo es {type(cxm)}...")
|
| 25 |
time.sleep(16)
|
| 26 |
|
| 27 |
id_imagenes = str(imagenes) + 'i'
|
| 28 |
+
id_valor = str(int(valor)) + moneda
|
| 29 |
id_cxm = str(cxm) + moneda
|
| 30 |
print(f"id_cxm es : {id_cxm} y su tipo es {type(id_cxm)}...")
|
| 31 |
|
|
|
|
| 44 |
items.append({
|
| 45 |
"item_id": item_id, #1000i-1900mxn
|
| 46 |
"item_name": item_name, #1.8mxn
|
| 47 |
+
"price": valor,
|
| 48 |
"quantity": 1
|
| 49 |
})
|
| 50 |
|