#Vinz
1 messages · Page 1 of 1 (latest)
Hi, I have this article from google ads https://support.google.com/google-ads/answer/6386790
Transaction IDs are unique identifiers for each transaction, such as an order confirmation number. They help avoid counting duplicate conversions. Use transaction IDs for tracking online and offlin
We likely cannot help with that here. This chat is focused on developers and API integration questions for Stripe products specifically.
<!-- Event snippet for Example conversion page -->
<script>
gtag('event', 'conversion', {'send_to': 'AW-123456789/AbC-D_efG-h12_34-567',
'value': 1.0,
'currency': 'USD',
'transaction_id': '<%= orderId %>',
});
</script>
Yes but just listen to me
Hi want to insert it on the sucess page
so I need to insert a bunch of code depending on the checkout transaction in the success page
here is how I build the checkout session
if customer_id:
checkout_session = stripe.checkout.Session.create(
line_items=line_items,
customer=customer_id,
success_url=settings.SITE_URL + reverse('transactions:success_url'),
cancel_url=settings.SITE_URL + reverse('transactions:cancel_url'),
payment_method_types=["card"],
mode='payment',
billing_address_collection='required',
)
else:
checkout_session = stripe.checkout.Session.create(
line_items=line_items,
customer_email=request.user.email,
success_url=settings.SITE_URL + reverse('transactions:success_url'),
cancel_url=settings.SITE_URL + reverse('transactions:cancel_url'),
payment_method_types=["card"],
mode="payment",
billing_address_collection='required',
)
What would you advise to get a success page that has a parameter with the checkout session id ?
@native portal my question is about stripe not google ads especially
You can modify the success_url as described here to include the Checkout Session ID: https://stripe.com/docs/payments/checkout/custom-success-page
Exactly what I needed