TronDesigner – Integration Examples
Docs: Developer documentation  |  Customers and orders

Back to examples

Session Tracking & Identifiers

Link print jobs to your application's users, orders, and cart items. The data is saved with the print job and returned in the printJob events, getPrintJob(), the REST API and webhooks.

Fields of printJob.customer:

printJob.customProperties - your own key/value metadata (string values), see the Custom Properties example.

Logged-in users: to make the TronDesigner customer itself (with its logo gallery and print jobs) your user, set data-td-customer-identity on the script tag or call setCustomer({ customerIdentity }) after login - see Customers and orders.

Current Session IDs (simulated)

User ID:
Order ID:
Cart Item ID:
Oregon 400 ml - Red

User Tracking

Oregon 400 ml - Red

Order Tracking

Oregon 400 ml - Red

Cart Item Tracking

Oregon 400 ml - Red

Custom Metadata

Oregon 400 ml - Red

Complete Tracking

Use Cases

E-Commerce Integration

  • Link print jobs to cart items
  • Enable "edit from cart" workflow
  • Track designs through checkout
  • Associate with order after purchase

User Management

  • Display user's past designs
  • Enable design library per user
  • Track user design activity
  • Personalization based on history

Analytics & Reporting

  • Campaign performance tracking
  • A/B test variant tracking
  • Conversion funnel analysis
  • Custom business metrics

Implementation Code

td.openDesigner({
    "openMode": "Create",
    "dataMode": "Exact",
    "printJob": {
        "addPrintings": [
            {
                "printPositionCode": "front",
                "printTechnologyCode": "PAD03"
            }
        ],
        "addProducts": {
            "supplierCode": "PFC",
            "variants": [
                {
                    "productCode": "10086021"
                }
            ]
        },
        "customer": {
            "customerIdentity": currentUserId,
            "customerEmail": currentUserId + "@example.com",
            "customerPerson": "User " + currentUserId,
            "customerCompany": "Company of " + currentUserId,
            "orderCode": currentOrderId,
            "orderItemCode": currentCartItemId,
            "orderTitle": "Example Product in Cart"
        },
        "customProperties": {
            "campaignId": "summer2024",
            "source": "product_page",
            "sessionStart": "2024-06-01T12:00:00Z",
            "userSegment": "premium"
        }
    }
}, {mode: "dialog"});

Builder and HTML alternatives

// Logged-in user: the customer record itself (logo gallery, print jobs)
await window.tronDesigner.setCustomer({ customerIdentity: 'user-1234', customerEmail: 'jane@acme.example' });

// Order / cart info for one print job - note the argument order: title, code, item code
window.tronDesigner
    .setOrderInfo('Oregon 400 ml - red', 'ORD-2026-0815', 'CART-LINE-3')
    .setExactProduct('PFC', undefined, (p) => p.addVariant('10086021'))
    .addExactPrinting('front', 'PAD03')
    .open({ mode: 'dialog' });

<!-- HTML -->
<script async src="https://app.trondesigner.com/js/website-integration.js" ...
        data-td-customer-identity="user-1234"></script>
<button data-td-action="OpenCreate" ...
        data-td-order-code="ORD-2026-0815"
        data-td-order-item-code="CART-LINE-3"
        data-td-order-title="Oregon 400 ml - red">Design</button>