Attributing a transaction id passed from landing URL to additional script pixel code parameter

Hi all,

wondering is there a way we can capture this transaction_id value from landing URL : www.domain.com/?utm_source=google&session_id={transaction_id}

then store the cookie within the transaction_id and pass this value to the conversion pixel code at additional script such that :

{% for line_item in line_items %}

{% endfor %}

Could someone enlighten this lost child here please ? Thanks in advance.