Working with Passcode/Secret Link expiry in UNIX timestamp
When you've set an expiration time in the passcode or secret link keys, you can see the expiration time as a UNIX timestamp. That's found in cart.json between the "-" and the ":" in the Locksmith entry:
The number before the "-" is the key id that was used to open the lock. What's after the colon is not valuable.
Clearing the Locksmith cart attribute
Locksmith adds information as a cart attribute when using remote keys. You can clear that manually with something like this. This triggers when the page loads:
<script>
(function() {
var current_url = window.location.href;
var REDIRECT_PATH = '{{ current_url }}{% if collection %}/collections/{{ collection.handle }}{% endif %}/products/{{ product.handle }}';
var selector = '#create_customer, form[action$="/account"][method="post"]',
$form = document.querySelectorAll(selector)[0];
if ($form) {
$redirect = document.createElement('input');
$redirect.setAttribute('name', 'return_to');
$redirect.setAttribute('type', 'hidden');
$redirect.value = REDIRECT_PATH;
$form.appendChild($redirect);
}
})();
</script>
Removing product information from Shopify Analytics in the page source
Sometimes, Shopify Analytics, Google Analytics, or Web Pixels can leave bits of information about your locked products in the page source. Locksmith can't filter that, since it's outside of your theme, but you may be able to replace the content with null values for just your locked resources.
Here's an example of how that might work with Shopify Analytics scripts: