[[+content_image]]
D
D
denism3002019-07-09 12:02:18
MODX
denism300, 2019-07-09 12:02:18

How to insert order number into script in miniShop2?

How to insert an order number into the conversion tracking script in miniShop2 in MODx?
I tried this: I
inserted a script in the head of the successful checkout template

[[!msOrder?
    &tpl = `
        <!-- Event snippet for Покупка conversion page -->
        <script>
            gtag('event', 'conversion', {
                'send_to': 'AW-731837584/YoJmCLz0kaUBEJDp-9wC',
                'transaction_id': '{$order.num}'
            });
        </script>`
]]

The script is displayed on the page, however, the order number in 'transaction_id': is not substituted. How to fix?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
P
Pavel Bigel, 2019-07-10
@navicrstl

Why call $order.num and not just num?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question